PDA

View Full Version : Scroll Bars forcing centered content to jump


Ricky55
10-13-2008, 08:01 PM
How do you guys deal with this problem.

In IE 6 its fine not sure if IE 7 does the same but when the scroll bars are not needed they are just ghosted out, in safari though when the scroll bars are not needed they just don't appear.

When the content in my site gets longer though and the scroll bars appear again it makes the site look like its jumping.

Is it possible to force the scroll bars in Safari even when they are not needed? or would this be confusing? Can this be done with CSS?

Shall I just leave it? what do you guys think?

Ricky55
10-13-2008, 08:13 PM
Found a solution for Firefox but not Safari yet

/*Force Scrollbar in Firefox */
@-moz-document url-prefix() {
body {
overflow: -moz-scrollbars-vertical;
}
}

Cary
10-13-2008, 11:39 PM
Try this:
<!--[if !IE]>-->
<style type="text/css">
body {
overflow-y:scroll;
}
</style>
<!--<![endif]-->

Ricky55
10-14-2008, 01:17 AM
would that just target IE?

Its OK in IE for once in IE's life it is actually working as you'd want it to.

Its just Safari thats the problem.

Cary
10-14-2008, 03:13 AM
!IE = "not IE", so it will be ignored by IE.