Forum Moderators: open

Message Too Old, No Replies

page refresh problem on IE

this doesn't happen on Firefox

         

danielanaidu

5:30 pm on Sep 7, 2005 (gmt 0)

10+ Year Member



I have a problem that occurs ONLY on IE. When I load a page, then hit the refresh button, the page jumps slightly to the right. If I follow a link to another page on the site, then that page jumps back to the left. If I hit the back button, the previous page is also back at the original position. This DOESN'T happen on Firefox. If anyone has any ideas, I would really appreciate it. Thank you very much in advance for your help!
(p.s. someone already suggested that i adjust table and cell widths, but that didn't fix it)

tedster

8:03 pm on Sep 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello danielanaidu, and welcome to the forums.

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.

collymellon

9:31 am on Sep 8, 2005 (gmt 0)

10+ Year Member



Have you got some code you can post - I have had this before using CSS only layouts, I did fix it by playing around with the widths of certain divs..

danielanaidu

12:42 pm on Sep 8, 2005 (gmt 0)

10+ Year Member



I would be very happy to post some code, but since I don't know which portion of the code could be causing the problem, I don't know what to post. What do you suggest I do?

tedster

3:33 pm on Sep 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can start with a copy of the whole page on your machine, then edit out bits and chunks of code that don't seem likely to be the culprits. Test your duplicate page after each edit.

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.

danielanaidu

3:56 pm on Sep 8, 2005 (gmt 0)

10+ Year Member



yesterday I tried taking everything out of the page except for one table, with one cell. When I viewed that page, it still jumped. But I will do what you suggested and post the code here. BTW, I use FrontPage, so I'm by no means an expert in any of this. Thanks again for helping out!

encyclo

4:30 pm on Sep 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've seen the same problem - I think it is related to the vertical scrollbar as the offset tends to be equivalent to to the pixel width of the scrollbar. Usually, IE always adds a scrollbar even when the page does not fill the full screen length, but during a refresh, the width/position of elements seem to be calculated as if the scroolbar is absent, then move across once it appears. Sometimes this doesn't happen - hence the effect you are describing.

However the bug is difficult to reproduce, so much of the above is conjecture - and might be totally inaccurate!

susie

12:59 pm on Sep 29, 2005 (gmt 0)



I don't know if this problem was solved or not, but what you are describing happened to me, and the only thing that stopped it was to add all the page margins in at zero ....including the NS ones. Just the IE ones didnt work.

<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%;
}