Forum Moderators: not2easy

Message Too Old, No Replies

Scrollbar Causing Layout Shift

scrollbar in FF and IE is causing layout shift

         

elitebomber

10:01 pm on Jul 30, 2008 (gmt 0)

10+ Year Member



The problem is a common one in which FF doesn't display a scrollbar unless it is needed. When you switch to content that requires a scrollbar, the whole layout shifts a little bit to the left.

I found one semi-solution in which you can set overflow-y: auto in the body tag but for some reason in FF3 It just creates a second scrollbar when you load a page that needs a scrollbar.

Is there any way to adjust for the scrollbar so the layout doesn't shift?

Thanks in advance.

birdbrain

6:27 pm on Jul 31, 2008 (gmt 0)



Hi there elitebomber,

try it like this...


<style type="text/css">
html{
overflow-y:scroll;
}
</style>

birdbrain