Forum Moderators: not2easy
Everything is inside a div.container and is centered on the page. If I give the container a height of "auto" some of the pages will shift to the right slightly when loaded. I can see this in Netscape, Firefox and Opera. It happens when the centre div changes from having a bit of information to a lot.
I can fix this by specifying a height of 840 pixels but this gives me scroll bars even when they are not needed.
The original site has a fixed height and handles the changes well but I really would like to fix it the proper way. I just do not know how.
Thanks for any replies in advance.
[edited by: SuzyUK at 9:41 pm (utc) on Jan. 25, 2007]
[edit reason] No site specifics, thanks. See TOS #13 [WebmasterWorld.com] [/edit]
t happens when the centre div changes from having a bit of information to a lot.
so does that mean there's scrollbar sometimes (I couldn't find it even viewing the link)?
If there's a scrollbar your viewport wil be slightly smaller (about 16px by default though not exactly x-browser) therefore your area for centering will expand/reduce as appropriate, except IE which produces a scrollbar by default no matter the length of the page so the "shift" is not there.
The 'cure' is to make the body/wrapper element 100.01% minimum height to force a scroll in all browsers
If you want my v.humble opinion.. if that is the reason for the 'shift' - no-one will notice as long as the content of your pages are what they're expecting and they're not just at your site to measure pixels!
Suzy
This fixed the scroll bar problem in all browsers but gave me another problem
On my a-z photo pages and my Unit Board page (all have photos) , half of my header would disappear and the backgrounds to my menus would go also. There was a white oblong obscuring it.
I had to use a slightly different Style sheet with the height set to 840px and with none of the other extra code above included.
Frustrating.
Something is conflicting with the new info . maybe I have been looking at it too long to see the problem
This problem shows up in the other 3 browsers but not IE 6 OR 7
[edited by: encyclo at 3:22 pm (utc) on Jan. 26, 2007]