Forum Moderators: not2easy
i have my CSS repeating a background image vertically.. its also centered horizontally using the following code:
Code:body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed; background-image: url(images/background.jpg); background-repeat: repeat-y; background-position: center top;
}
however, if a page requires scrolling the background image gets shunted to the left to compensate for the width of the scroll bar which appears.. ( this can be seen if you click the button for "LINKS" in my frame at the top..)
is there a way to stop it shunting the background image to the left?
I have noticed that it does not do this all the time.. if i view a page that does not require scrolling and then manually resize the window so that it does, then the background image does not get shunted...
any help or enlightenment greatly received
thanks again...
kev
[edited by: Nick_W at 11:53 am (utc) on Nov. 5, 2003]
i don't know if i get you right, but how about:
- hide the scrollbar
- use a fixed-width layout
maybe this is right for your page. because the scrollbar itself is not part of the website at all, it's part of the browser so you've got no control about it.
if you hide the scrollbar you can then use some javascript to provide your own scrollbar.
-hakre