Use a CSS Reset

This is another area that’s been debated to death. CSS resets: to use or not to use; that is the question. If I were to offer my own personal advice, I’d 100% recommend that you create your own reset file. Begin by downloading a popular one, like Eric Meyer’s, and then slowly, as you learn more, begin to modify it into your own. If you don’t do this, you won’t truly understand why your list items are receiving that extra bit of padding when you didn’t specify it anywhere in your CSS file. Save yourself the anger and reset everything! This one should get you started.

  1. html, body, div, span,  
  2. h1, h2, h3, h4, h5, h6, p, blockquote, pre,  
  3. a, abbr, acronym, address, big, cite, code,  
  4. img, ins, kbd, q, s, samp,  
  5. small, strike, strong,  
  6. dl, dt, dd, ol, ul, li,  
  7. fieldset, form, label, legend,  
  8. table, caption, tbody, tfoot, thead, tr, th, td {  
  9.     margin: 0;  
  10.     padding: 0;  
  11.     border: 0;  
  12.     outline: 0;  
  13.     font-size: 100%;  
  14.     vertical-alignbaselinebaseline;  
  15.     backgroundtransparent;  
  16. }  
  17. body {  
  18.     line-height: 1;  
  19. }  
  20. ol, ul {  
  21.     list-stylenone;  
  22. }  
  23. blockquote, q {  
  24.     quotesnone;  
  25. }  
  26. blockquote:before, blockquote:after,  
  27. q:before, q:after {  
  28.     content'';  
  29.     contentnone;  
  30. }  
  31.   
  32. table {  
  33.     border-collapsecollapse;  
  34.     border-spacing: 0;  

posted on 2012-02-17 17:47  black263  阅读(178)  评论(0编辑  收藏  举报