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.

  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
Posted By: berkes on December 13, 2006
Posted By: aziz on December 9, 2007

I still prefer YUI reset css file. I guess it's more reliable.

Posted By: breakerjump on July 27, 2008

The (albeit heavier) Blueprint CSS Framework provides a more comprehensive reset, in addition to solving a variety of other base-level issues and common developer chores, such as print styling, form styling, etc. Not to mention the grid layout with its push and pull methods.

You need to login to post a comment.