Forum Moderators: open
I've seen this shift on a couple sites and I have not been able to debug it. I take comfort in the fact that most online users will not see the screen refresh as quickly as I do locally, and so the strange jump is not really visible. However, one instance is meant for use from a CD, so I would also appreciate any insights that members have to offer.
My examples are on table based layouts, html 4.01 strict and the page validates according to the W3C.
In this way you can boil a lot of code down to a manageable chunk for others to look at. This would also be true for any CSS - color rules are probably not going to be relevant, for example.
Before pasting into the forum, be sure to replace any domain names with "example.com"
By the way, I just went back to the pages where I had this trouble to try this same process. But I no longer see the problem! So either I upgraded my browser in the meantime and that handled it, or I changed something on the site and unknowingly fixed the jump problem.
However the bug is difficult to reproduce, so much of the above is conjecture - and might be totally inaccurate!
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
and the page stopped jumping. Wierd .. but that solved it for me.
So do not know if that is relevant to your problem or not.
As regards scrollbars, IE always maintains the same page width regardless of whether ther is a scrollbar present or not. On the other hand Firefox and Opera do not.
If you make a short page (with a table centered on page) (one that does not require a scrollbar) then make a longer page with centered table (that does require the scrollbar) and flip between the two in firefox you will see the table jump as the non scrollbar page is 20px wider, so the centred table has to shift. The way to cure that is to set the CSS for the page to be 101% high then that forces a scrollbar on the short page and the table doesnt jump. Doesnt work for Opera though, only firefox.
html {
min-height: 101%;
}