code_junkie

How do I make Standards mode work as well as quirks mode?

Nov 13th, 2011
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <!-- Deliberately no DocType to induce Quirks Mode -->
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <style type="text/css">
  5. Input.quirks
  6. {
  7. margin: 1px 0px 1px 0px;
  8. border: solid black 1px;
  9. }
  10. </style>
  11. </head>
  12. <body>
  13. Should work in Quirks Mode <br />
  14. <input class="quirks" type="text" style="width: 300px;" /><br />
  15. <input class="quirks" type="text" style="width: 147px;" /><img src="./Graphics/SpacerPixel.gif" border="0" /><input class="quirks" type="text" maxlength="25" style="width: 150px;" /><br />
  16. <input class="quirks" type="text" style="width: 94px;" /><img src="./Graphics/SpacerPixel.gif" border="0" /><input class="quirks" type="text" style="width: 100px;" /><img src="./Graphics/SpacerPixel.gif" border="0" /><input class="quirks" type="text" value="DA8 1DE" style="width: 100px;" />
  17. </body>
  18. </html>
  19.  
  20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  21. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  22.  
  23. 300px + 5px = 305px
  24. 145px + 150px + 2*5px = 305px
  25. 90px + 100px + 100px + 3*5px = 305px
Add Comment
Please, Sign In to add comment