Forum Moderators: not2easy
For my horizontal navigation bar I am using a div tag and applying a background to it, and I would like the background image to stretch all the way across the screen. The problem, however, is that it only stretches to about 97-98% of the screen. Setting it to 102% makes it fit the edge, but if I resize the screen at all, it gets incrementally farther away the smaller I make it! Crazy!
Ok here's the code.
CSS
#linkCascade {
background: url(../images/linkCascade.gif) repeat-x;
position: absolute;
left: 0px;
top: 68px;
width: 100%;}
HTML
<link href="style/style.css" rel="stylesheet" type="text/css">
<body>
<div id="banner"></div>
<div id="linkCascade"><a href="index.php">Home</a><img src="images/separator_white_tall.gif" width="20" height="10">
</div>
</body> Thanks for any pointers!
to hide from old and non-css browsers .. important
See this thread:
[webmasterworld.com...]
if so, try this:
#linkCascade {
background: url(../images/linkCascade.gif) repeat-x;
position: absolute;
left: 0px;
top: 68px;
right: 0px;
width: 100%;
}
Brian
In case anyone else runs across this problem, here's my redefinition of body:
body {
background: F0F1E8 url(../images/headerCascade.gif) repeat-x 0px 0px;
scrollbar-arrow-color: #77796D;
scrollbar-dark-shadow-color: #0000FF;
scrollbar-face-color: #F0F1E8;
scrollbar-highlight-color: #BDBF9B;
scrollbar-shadow-color: 446681;
margin: 0;
padding: 0;}
(This is for my work intranet and we all use I.E 6 so I can get away with CSS 3 :)