Posted By


beneberle on 06/18/09

Tagged


Statistics


Viewed 650 times
Favorited by 1 user(s)

CSS global reset


/ Published in: CSS
Save to your folder(s)

Eric Meyer's venerable reset css styles.


Copy this code and paste it in your HTML
  1. html, body, div, span, applet, object, iframe,
  2. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  3. a, abbr, acronym, address, big, cite, code,
  4. del, dfn, em, font, img, ins, kbd, q, s, samp,
  5. small, strike, strong, sub, sup, tt, var,
  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-weight: inherit;
  14. font-style: inherit;
  15. font-size:62.5%; /*sets 10px as base, making em calculations easy */
  16. font-family: inherit;
  17. vertical-align: baseline;
  18. }
  19.  
  20. :focus {
  21. outline: 0;
  22. }
  23.  
  24. body {
  25. line-height: 1;
  26. color:black;
  27. background:white;
  28. }
  29.  
  30. ol, ul {
  31. list-style: none;
  32. }
  33.  
  34. /* tables still need 'cellspacing="0"' in the markup */
  35. table {
  36. border-collapse: separate;
  37. border-spacing: 0;
  38. }
  39.  
  40. caption, th, td {
  41. text-align: left;
  42. font-weight: normal;
  43. }
  44.  
  45. blockquote:before, blockquote:after, q:before, q:after {content: "";}
  46. blockquote, q {quotes: "" "";}
  47.  
  48. strong{font-weight: bold;}
  49. em{font-style: italic;}
  50. .clear{clear: both;}
  51.  
  52. something:after{
  53. content: ".";
  54. height: 0;
  55. display: block;
  56. clear: both;
  57. visibility: hidden;
  58. }
  59.  
  60. .left, #left{
  61. float: left;
  62. display: inline;
  63. }
  64.  
  65. .right, #right{
  66. float: right;
  67. display: inline;
  68. }

URL: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.