views:

139

answers:

3

My layout breaks if I change the window size in IE7/AOL, so I added a simple javascript function that fires on window.onresize, but no matter how I change the location I get problems.

It was suggested I post a link and here it is:

link text

I already use PHP to detect browser and include an IE7-only inline stylesheet (and for mobile browsers), and my page looks nearly identical to the way it does in FF, Opera, Chrome, Safari and IE8, but when I change the window size, some things go wonky, and come back into line if you refresh. Any advice is welcome :)

A: 

I advise you to fix the real problem: your layout breaking when the browser is resized. Reloading the page onresize is definitely not a best-practice.

If you post a link to your page, you might get some good insight into the sources of your problems.

Ken Browning
Okay, I added a link now, this is it without the reload function.
A: 

I think that fixing layout issues like yours with javascript is not a good idea.

A better approach would be to detect what is broken. and add a conditional comment to include an IE only stylesheet.

Hugo Zapata
A: 

You should fix the layout problems instead.

There is no way to refresh a page in the way you want to do it. On reload, everything will be redrawn, and the blinking/not blinking is dependent on the exact state of the users' browser.

Joel L