centering page in firefox

fender

Limp Gawd
Joined
Mar 2, 2003
Messages
417
I've noticed that in IE the browser width is calculated with the scroll bar width removed. In FireFox, the scroll bar width is only removed from the browser width when the scroll bar appears. So when you're going from a page with no scroll bar to a page with a scroll bar, the browser width is changing, therefore the location of the center of the page is changing, so the centered page moves over to the left. Is there any way to work around this?
 
Firefox centers in the visible area. This is what you want. If not you're going to have to mess around with CSS and/or javascript.
 
You could force a vertical scrollbar. Add to your css:

html {overflow:-moz-scrollbars-vertical}
 
Like doh said, this is what you want to happen. You could give a certain number of pixels indent from the left side, but what looks good on your display doesn't on mine, and definitely not on my brother's dual monitor setup.

You could also force no scroll bars with overflow: hidden;. For that matter, the standard way of making scrollbars appear is overflow: scroll;.
 
Back
Top