Forum Moderators: not2easy

Message Too Old, No Replies

background image bug, please help!

i've searched previous posts but found no answer...

         

kevinmarkbroome

11:48 am on Nov 5, 2003 (gmt 0)



hi, hope u can help..

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]

hakre

12:32 am on Nov 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi kevinmarkbroome, welcome to webmasterworld [webmasterworld.com].

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