css - Making layout work in IE8 quirks mode -



css - Making layout work in IE8 quirks mode -

a 3rd party product outputs webpage iframes , i'm not in total command of content. main iframe missing doctype declaration , forces ie8 quirks mode.

i'm maintaining javascript application adds several buttons right border of screen. problem layout off in ie8 quirks mode. buttons not visible (probably due wrong ie z-index behavior) , position off.

i thinking creating separate css ie8. how should go tuning css quirks mode?

if have command on (separate) javascript files, , presuming js file called in head, set conditional class on html element, this:

<html> <head> <title>demo conditional class quirks mode</title> <script type="text/javascript" src="folder/js_file.js"></script> <style type="text/css"> div { width: 100px; height: 100px; background: red; position: relative; left: 100px; } .ieqm div { left: 200px; } </style> </head> <body> <div></div> </body> </html>

while adding js_file.js:

if (document.documentmode == 5) document.documentelement.classname += ' ieqm'; // ie in quirks mode

. way, wonder whether problem in ie8, document not having doctype? don't ies revert quirks mode without it?

css internet-explorer-8 quirks-mode

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -