开发者

IE8 compatibility mode

I've created a website that displays correctly in all browsers including IE8 when viewed from my local server i.e. http://localhost

However when I view the website from another machine, http://pc5008 for example, IE8 goes into what seems like compatibility mode and looks开发者_StackOverflow terrible.

Extra Info

When viewed from the localhost IE8 gives an option to view in compatibility mode. If I choose this option it looks the same as when viewed on the non-localhost i.e. terrible.

When viewed on the non-localhost IE8 doesn't show the option to view in compatibility mode. (compatibility mode under Tools is greyed out)

Also, everything validates as XHTML 1.0 Strict.


I'm not very familiar with the subject, however as I know IE chooses it's mode (standard/quirks-mode) based on doctype declaration. Check if your doctype is correct.

Maybe this article will help: Activating Browser Modes with Doctype.

If the problem is eventually with doctype, try declaring it html5 style:

<!DOCTYPE html>


In turns out that IE8 has an option under Tools\Compatibility View Settings\ called 'Display intranet sites in Compatibility View'. Disabling this feature fixes my problem.

Another solution is to add the following line to the head:

    <meta http-equiv="x-ua-compatible" content="IE=8">

This overrides the setting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜