SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict fattyjules's Avatar
    Join Date
    Dec 2005
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why does this document trigger quirks mode?

    In IE8 this page triggers quirks mode.

    It's HTML 4.0 strict, it validates - why won't it work? I feel like I'm on crazy pills!

    Thanks

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    Quirks mode in what browser? IE8 ??

  3. #3
    SitePoint Addict fattyjules's Avatar
    Join Date
    Dec 2005
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, IE8. I mentioned it in the first sentence.

  4. #4
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code HTML4Strict:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    	<head>
    		<meta http-equiv="content-type" content="text/html; charset=utf-8">
    		<title>Document</title>
     
    		<style type="text/css">
    		<!--
    			* {
    			    margin: 0;
    			    padding: 0;
    			}
    			body {
    			    width: 500px;
    			    margin: auto;        
    			}
    		-->
    		</style>
     
    	</head>
     
    	<body>
     
    		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nisl libero, porttitor at interdum non, euismod ac est. Mauris rutrum ante erat. Suspendisse nec pharetra tellus. Donec diam lorem, scelerisque et porttitor nec, lacinia sed velit. Nullam condimentum dapibus eros, vitae sodales augue laoreet malesuada. Fusce nulla neque, ullamcorper vitae convallis eget, pharetra id lacus. Proin lacinia hendrerit ante et eleifend. Etiam et vestibulum risus. Morbi imperdiet commodo nibh, quis faucibus turpis dignissim congue. Vivamus nec convallis magna.</p>
     
    	</body>
    </html>

    Try this...

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    :d'oh: You most certainly did.

    Maybe if you added
    HTML Code:
    <meta http-equiv="X-UA-Compatible" content="IE=8" >
    I don't see where it should make a difference but maybe lower case
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 
    "http://www.w3.org/TR/html4/strict.dtd">
    or a space
    HTML Code:
    <meta http-equiv="Content-Type"
     content="text/html; charset=utf-8" >
    The mark-up can't can't get much more bare-bones than it is. So this really is a head scratcher.

  6. #6
    SitePoint Addict fattyjules's Avatar
    Join Date
    Dec 2005
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm now realising that the IE8 Developer Tools don't work they way I thought they did.

    When I changed the document mode to Quirks/IE7/IE8, that mode would 'stick' even after I refreshed the page. So my initial assumption might be wrong.

    I'm still trying to figure out how to make IE8 'forget' the document setting in Dev Tools. Does anyone know how?

  7. #7
    SitePoint Addict fattyjules's Avatar
    Join Date
    Dec 2005
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Forgive me folks, I had my wires crossed.

    I thought IE8 was still loading it in quirks mode, when in fact it was just 'remembering' my document mode selection in Dev Tools.

    Live and learn!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •