Conditional HTML for ie8 quirks target mode

I have a page that does not display correctly in quirks ie8 mode. If I want to create some CSS to target this particular mode, but not ie8 ok, what will the conditional HTML be?

For example, if I just wanted to press ie8:

<!--[if IE 8]>
    awesome hacky stuff goes here
<![endif]-->

So what is the part IE 8for ie8 quirks?

+3
source share
2 answers

You cannot use conditional comments to set the browser rendering mode (version only).

If you are in quirks mode, use a document type that does not call it.

, IE8, IE7. ...

<!--[if IE 7]>
    awesome hacky stuff goes here
<![endif]-->
+4

, quirks. DOCTYPE , HTML . XHTML DOCTYPE, , .

+1

Source: https://habr.com/ru/post/1770836/


All Articles