undohtml.css - Tantek's Original (Removes Browser Default Style)


/ Published in: CSS

Purpose: undo some of the default styling of common (X)HTML browsers. (CC) 2004 Tantek Celik.


Copy this code and paste it in your HTML
  1. /* undohtml.css */
  2. /* (CC) 2004 Tantek Celik. Some Rights Reserved. */
  3. /* http://creativecommons.org/licenses/by/2.0 */
  4. /* This style sheet is licensed under a Creative Commons License. */
  5. /* http://www.tantek.com/log/2004/undohtml.css */
  6. /* Purpose: undo some of the default styling of common (X)HTML browsers */
  7.  
  8.  
  9. /* link underlines tend to make hypertext less readable,
  10.   because underlines obscure the shapes of the lower halves of words */
  11. :link,:visited { text-decoration:none }
  12.  
  13. /* no list-markers by default, since lists are used more often for semantics */
  14. ul,ol { list-style:none }
  15.  
  16. /* avoid browser default inconsistent heading font-sizes */
  17. /* and pre/code too */
  18. h1,h2,h3,h4,h5,h6,pre,code { font-size:1em; }
  19.  
  20. /* remove the inconsistent (among browsers) default ul,ol padding or margin */
  21. /* the default spacing on headings does not match nor align with
  22.   normal interline spacing at all, so let's get rid of it. */
  23. /* zero out the spacing around pre, form, body, html, p, blockquote as well */
  24. /* form elements are oddly inconsistent, and not quite CSS emulatable. */
  25. /* nonetheless strip their margin and padding as well */
  26. ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input
  27. { margin:0; padding:0 }
  28.  
  29. /* whoever thought blue linked image borders were a good idea? */
  30. a img,:link img,:visited img { border:none }
  31.  
  32. /* de-italicize address */
  33. address { font-style:normal }
  34.  
  35. /* more varnish stripping as necessary... */

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.