quirks-mode

How do I force Internet Explorer to render in Standards Mode and NOT in Quirks?

你离开我真会死。 提交于 2019-11-26 05:25:22
问题 I am coding a Frontend which works well in IE7 Standards Mode and IE8 Standards Mode. When I start up Internet Explorer and load the page both IE7 and IE8 go to Quirks Mode directly. How can I force both IE7 and IE8 to always load the page in Standards Mode? I have no special meta tags added so far. Thanks for helping me out Edit: My doctype and head looks as follows at the moment: <!DOCTYPE html> <html lang=\"de\"> <head> <title>...</title> <meta http-equiv=\"X-UA-Compatible\" content=\"IE

How to tell if a browser is in “quirks” mode?

断了今生、忘了曾经 提交于 2019-11-26 03:35:48
问题 Let\'s suppose you have a page with a relatively strict doctype and HTML markup that\'s pretty close to compliant, but perhaps misses in a few silly ways, perhaps because of user content that\'s out of your control... say you\'re working on a content management system or a theme for a content management system where you control some basic structure and need some javascript, but you\'re not responsible for everything else that goes into pages. How can you tell (or: what will determine) when

Why does my div height 100% work only when DOCTYPE is removed?

只愿长相守 提交于 2019-11-26 00:09:59
问题 This is the entire code: <!DOCTYPE HTML> <html> <body style=\"height: 100%; padding: 0; margin: 0;\"> <div style=\"background-color: green; height: 100%; width: 100%\"></div> </body> </html> Nothing appears. But if I remove the first line (the doctype ), all of the page is green as expected. I have two questions: How do I make the div fill the page without removing that tag? Why does removing the doctype make it work? 回答1: CSS height property, percentage values & DOCTYPE The first part of