I have created a webpage (http://www.snow4life.yum.pl) that was rendered properly in firefox, chrome etc. Of course dumb IE complicated things, because it enters quirk mode automatically, even though doctype is properly set and site goes through w3 validation (there is one error of missing some char, but file was cleared in hex editor). How can I stop ie from entering quirks mode ? Is there any way ?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- Is TWebBrowser dependant on IE version?
Try killing all the whitespace before the DOCTYPE.
EDIT: There is an
<feff>
character which is a Unicode BOM signature at the start of the file. Since you may not have a text editor that can actually see that, try deleting the entire first line and paste over it withAnd do NOT save the file with a BOM unicode signature. If this doesn't work, try a different text editor altogether.
Quirks mode in any version of IE will also be triggered if anything precedes the DOCTYPE. For example, if a hypertext document contains a comment, space or any tag before the DOCTYPE declaration, IE will use quirks mode:
I added both the doctype from the first comment and then the meta tag and it worked thanks guys .... and no thanks to IE :(
and
I have just changed the doctype to html5 and it still works great
Paste the below code within the head tag