Forum Moderators: not2easy
Code is fully validated and file paths for the images are 100% valid.
The background colour and any changes I make to the css are displayed except for the background images. Tested in multiple browsers.
I know this is basic and its embarassing, please help!
css---------------------------------------------------------
#header {
float:left;
width:100%;
line-height:normal;
font-size: 90%;
background:Yellow;
}
#header ul {
margin:0;
padding:0;
list-style:none;
}
#header li {
float:left;
background:url("graphics\gif\norm_right.gif")
no-repeat right top;
padding:0;
margin:0;
}
#header a {
display:block;
background:url("graphics\gif\norm_left.gif")
no-repeat left top;
padding:5px 15px ;
}
xhtml------------------------------------------------------
<body>
<div id="header">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Education</a></li>
<li><a href="#">WorkHistory</a></li>
<li><a href="#">Industry</a></li>
<li><a href="#">Activities</a></li>
<li><a href="#">References</a></li>
</ul>
</div>
------------------------------------------------------------
Thankyou, Jamie.
url("graphics\gif\norm_right.gif")
Also that path needs to be relative to where your css is stored.
So if you store your css in e.g. a css sbdirectory off of your document root, it need to get back to the root directory (with a ../ or a / in front of the path.
---does not work as indicated in the example.---------------
#header a {
display:block
background:url("graphics/gif/norm_left.gif")
no-repeat left top;
padding:5px 15px;
}
------------------------------------------------------------
Smaller left image does not display because right image appears to stretch over it.
Here is the full code:
CSS---------------------------------------------------------
#header {
float:left;
width:100%;
background:yellow;
font-size:93%;
line-height:normal;
}
#header ul {
margin:0;
padding:0;
list-style:none;
}
#header li {
float:left;
/*this is the larger image 300px wide*/
background:url("graphics/gif/norm_right.gif")
no-repeat right top;
margin:0;
padding:0;
}
#header a {
display:block
/*this is the smaller image 16px wide*/
background:url("graphics/gif/norm_left.gif")
no-repeat left top;
padding:5px 15px;
}
xhtml------------------------------------------------------
<div id="header">
<ul>
<li><a href="#">Home</a></li>
<li id="current"><a href="#">News</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
-----------------------------------------------------------
What am I doing wrong? Please help! Thankyou.