Eric Meyers Baseline CSS


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

Removes the default styling different browsers use, so you minimise cross browser problems.


Copy this code and paste it in your HTML
  1. /* Don't forget to set a foreground and background color
  2.   on the 'html' or 'body' element! */
  3. html, body, div, span, applet, object, iframe,
  4. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  5. a, abbr, acronym, address, big, cite, code,
  6. del, dfn, em, font, img, ins, kbd, q, s, samp,
  7. small, strike, strong, sub, sup, tt, var,
  8. dl, dt, dd, ol, ul, li,
  9. fieldset, form, label, legend,
  10. table, caption, tbody, tfoot, thead, tr, th, td {
  11. margin: 0;
  12. padding: 0;
  13. border: 0;
  14. outline: 0;
  15. font-weight: inherit;
  16. font-style: inherit;
  17. font-size: 100.01%;
  18. font-family: inherit;
  19. vertical-align: baseline;
  20. }
  21. /* remember to define focus styles! */
  22. :focus {
  23. outline: 0;
  24. }
  25. body {
  26. line-height: 1;
  27. color: black;
  28. background: white;
  29. }
  30. ol, ul {
  31. list-style: none;
  32. }
  33. /* tables still need 'cellspacing="0"' in the markup */
  34. table {
  35. border-collapse: separate;
  36. border-spacing: 0;
  37. }
  38. caption, th, td {
  39. text-align: left;
  40. font-weight: normal;
  41. }
  42. blockquote:before, blockquote:after,
  43. q:before, q:after {
  44. content: "";
  45. }
  46. blockquote, q {
  47. quotes: "" "";
  48. }

URL: http://meyerweb.com/eric/thoughts/2007/04/14/reworked-reset/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.