Why is the site running in IE quirks mode?

三世轮回 提交于 2019-11-29 12:56:41

It's a Byte Order Mark, , which is invisible to most text editors. Try using VIM and killing it or somehow find a different text editor and kill everything before <!DOCTYPE html>

You can simply copy <!DOCTYPE HTML> and everything below it into a new file and save over it, meaning you wont be copying the BOM coming before it to resolve this issue; I've ran into it many times.

http://validator.w3.org/check?uri=www.sucramma.dk&charset=%28detect+automatically%29&doctype=Inline&group=0

The validation fails, see the first error:

Error Line 1, Column 1: Non-space characters found without seeing a doctype first. Expected .

The doctype is not sufficient to oblige the browser to standard mode. When an error it is encountered the rendering fall back to quirks mode.

Correct the errors and try again, you should be done

The site doesn't have a DOCTYPE so it will be running in quirks mode because it doesn't know what DTD to use...

EDIT: As pointed out by BoltClock, it does have a DOCTYPE (I'm just not up to scratch on HTML5 yet). My apologies.

Read more here: http://www.w3schools.com/tags/tag_doctype.asp

Try using full doctype declaration (and without a space at the beginning)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

I had this issue I changed to <!DOCTYPE html> and the it fixed it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!