Click to See Complete Forum and Search --> : Div align = center annoyance


skilled1
04-15-2009, 10:56 AM
I have noticed many-a time when aligning a page to center, that once the page content leads to the page being able to scroll that the center is not the same location as pages do not, creating a slight jumping affect when going though the navigation.

is there an easy way to remedy this problem?

bigalc
04-15-2009, 11:04 AM
If I understand you correctly, it's because the scroll bar appears on the right and reduces the window's available width slightly. Not sure how you'd get around it in any simple way though, unless you write a different css rule for pages without overflowing content...

lystar
04-15-2009, 11:18 AM
All you need to do is force the scroll bar to appear even when the content is too short to need it. It will appear greyed out.

To do this use the following:


html {
overflow-y: scroll;
}

skilled1
04-15-2009, 12:10 PM
If I understand you correctly, it's because the scroll bar appears on the right and reduces the window's available width slightly. Not sure how you'd get around it in any simple way though, unless you write a different css rule for pages without overflowing content...

that would be correct

All you need to do is force the scroll bar to appear even when the content is too short to need it. It will appear greyed out.

To do this use the following:


html {
overflow-y: scroll;
}

sweet, just what i was looking for. many thanks