css page problems

M

Mark

I am trying to create a style sheet where I can then change all the
backgrounds in my web pages. I put this in a css page and then I select the
style sheet on the web page but nothing shows. if I put the code below into
the web page it works. I'm not sure what I'm doing wrong.


<style type="text/css">
body {background: #EFEFEF url(images/bggreen.jpg) repeat-x;)
</style>
 
R

Ronx

<style type="text/css">
body {background: #EFEFEF url(images/bggreen.jpg) repeat-x;)
</style>

will not work in Firefox - it should be:

<style type="text/css">
body {background: #EFEFEF url(images/bggreen.jpg) repeat-x;}
</style>

Note the curly bracket after repeat-x;

What link are you using to the extenal stylesheet? What other code follows
this link in the <head> section of the page? And what is in the <body...>
tag? Finally, is the path from the stylesheet to bggreen.htm correct? It
should be the relative path from the stylesheet to the image.
--
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.
 
A

ANONYMOUS

You need to link the style sheet like this:

<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>

Substitute your name for "style.css"

The above link is placed in the header section of the html page:

<html>
<header>
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>
<title>Linking style sheet</title>
</header>
<body>
this is the body of my page
</body>
</html>

Hope this helps. If you could give us link to your page then we can
have a look at it to see what is wrong with your CSS file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top