Question

I have been pulling my hair out over the past few days with a div in that does not stretch across the entire width of the screen like it should. Works fine in Firefox, but in IE (IE8 to be specific) it will not render correctly unless it is in Compatibility Mode. If the page renders correctly in Compatibility Mode there has to be some hack or workaround that will also make it render correctly when not in Compatibility Mode.

This also brings up a last resort question for me, how do I force a page to load in Compatibility Mode without user intervention?

I would like to avoid using Compatibility Mode though because it breaks my JavaScript, so I will have to modify my JavaScript if Compatibility Mode is used.

Any thoughts?

Was it helpful?

Solution

I would suggest using the IE Developer Toolbar that comes installed in IE8 by default. It should help you troubleshoot your issue.

Adding this meta tag will also force IE8 to emulate IE7:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top