Mozilla Page Jump
March 22, 2005 2:51 PM   Subscribe

How's your HTML-fu? Mine is failing me. I've created two dummy pages Jump 1 and Jump 2.
In Internet Explorer, these pages are identical except for their length. However, in Firefox, 2.html isn't in the same place horizontally as 1.html even though I think it should be. Am I missing something obvious? Thanks for the help.
posted by tayknight to Computers & Internet (6 answers total)
 
It's because Firefox adds the vertical scroll bar for Jump 2 and thus shifts the content to the left by the width of the bar, but does not have a vertical scroll bar for Jump 1. On the other hand, IE always has the scroll bar, just grayed out of the page is less than a page tall (at least in my version of IE 5).
posted by skynxnex at 3:00 PM on March 22, 2005


Jump 2 is longer than Jump 1, and is thus causing the vertical scrollbar to appear. This is making the window in which your layout is centered more narrow.

Because your window is being narrowed by the scrollbar only on the right side, it makes it look like your table is jumping to the left, when really both margins are being reduced.

Fixes: position the table absolutely instead of centering OR put the document in a frameset, then force the scrollbars on for that frame (set the other frame to 1px, and use it for your hitbox counter or something).
posted by CaptApollo at 3:02 PM on March 22, 2005


Er, after post but should have been on preview: "just grayed out if the page is less than a page tall" and I have IE 6.0. Shows how often I use IE if I don't even know the version.
posted by skynxnex at 3:03 PM on March 22, 2005


AHH. Thanks. That slipped my mind. I thought i had to do with the length of the table in the right hand cell.

Is one or the other (MS or Firefox) more correct? Looking at other windows apps, the scrollbar is always there even when not needed.
posted by tayknight at 3:07 PM on March 22, 2005


Not that it changes reality, but here is what the Windows UI guidelines say on the subject:
When the information viewed in a window exceeds the size of that window, the window should support scrolling. ... The common practice is to display scroll bars if the view requires scrolling under any circumstances. If the window becomes inactive or is resized so that its contents do not require scrolling, you should continue to display the scroll bars. Removal of the scroll bars when the window is inactive may display more content and provide feedback about the state of the window, but it also has a drawback. A user must then take an extra step and explicitly activate the window to display the scroll bars and use them. Consistently displaying scroll bars provides a more stable environment.
posted by smackfu at 3:38 PM on March 22, 2005


IE on PCs is the only browser to my knowledge that always has the scrollbar. It's a pain when clients notice the "jump" on Safari/Firefox and try to blame the web designer. If you want to force all browsers to display a scrollbar so that your layout doesn't jump, try the method discussed at the end of this article.

I rejected this approach as a web designer because I think it crosses the line between controlling your site's presentation and overriding the user's browser tool. Colored scrollbars, automatic pop-ups, etc. are a no-no in my book.
posted by lychee at 5:26 PM on March 22, 2005


« Older Getting All Versions of a File from SourceSafe   |   More turntable trouble: Newer »
This thread is closed to new comments.