Forum Moderators: open

Message Too Old, No Replies

IE7 page looks different when refreshed/change tab

Loads out of alignment - when you tab back to it it's fine

         

surfgatinho

7:27 pm on Mar 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a page that works in FF and IE6 and sometimes in IE7

If I open the page it is really narrow and all the columns are pushed under each other down the page. However if I open another tab, go to another page and then come back it looks absolutely fine!
All my HTML/CSS is valid and I have a near identical site that looks fine. Does anybody have any idea what is going on and more importantly how to fix it?!

surfgatinho

7:33 pm on Mar 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



OK, have just noticed exact circumstance to recreate the issue.

Say I have the site open and another tab open. I load a page from the site all the columns are pushed below each other.
Now I go to the other tab and refresh this page. When I tab back to the original site everything looks perfect!

surfgatinho

7:40 pm on Mar 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Tried it on another PC and exactly the same behaviour. Looks like a bug in IE to me

DanA

8:39 pm on Mar 1, 2008 (gmt 0)

10+ Year Member



Usually a hasLayout problem.

SuzyUK

9:04 pm on Mar 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> Usually a hasLayout problem.

agreed, anything that "fixes" with a refresh/redraw is often a sure sign of a hasLayout error

you can often even open up an external application that uses a pop up over the untouched & 'broken' web page (my favourite is my screen calipers) drag it around the screen and see IE go into complete weirdness!

surfgatinho look for a main div that has margins, padding or border on it (1 of them or all), but no width or height, then try setting zoom:1; on it ..does it help?

surfgatinho

1:43 pm on Mar 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the responses, I started looking into the hasLayout problem but hadn't quite got the gist of it.

Anyway, like I said I had an almost identical site so I did a page comparison and spotted a <div style="clear: both;"></div> that I hadn't bothered with.
After dropping this in the problem has gone.