Posted By

elightbo on 04/13/09


Tagged

css reset


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

nirva
visuallyspun
sbai_s_g
jmacgr
nerdfiles


CSS Reset


 / Published in: CSS
 

URL: http://meyerweb.com/eric/tools/css/reset/index.html

This is Eric Meyer's reset things I've added along the way. My changes are noted. I would definitely start from his and create your own.

  1. /******************************************************************************************
  2. CSS Reset, thank you Eric Meyer...http://meyerweb.com/eric/thoughts/2008/01/15/resetting-again/
  3. changed attributes are noted
  4. ****************************************************************************************/
  5. html, g, div, span, applet, object, iframe,
  6. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  7. a, abbr, acronym, address, big, cite, code,
  8. del, dfn, em, font, img, ins, kbd, q, s, samp, strike, strong, sub, sup, tt, var,
  9. b, u, i, center,
  10. dl, dt, dd, ol, ul, li,
  11. fieldset, form, label, legend,
  12. table, caption, tbody, tfoot, thead, tr, th, td {
  13. margin: 0;
  14. padding: 0;
  15. border: 0;
  16. outline: 0;
  17. font-size: 100%;
  18. vertical-align: baseline;
  19. background: transparent;
  20. }
  21. html {
  22. background-color: #ffffff; /* ADDED (http://flickr.com/groups/underwearshowing/pool/)*/
  23. }
  24. body {
  25. line-height: 1;
  26. }
  27. ol, ul {
  28. list-style: none;
  29. }
  30. blockquote, q {
  31. quotes: none;
  32. }
  33.  
  34. /* remember to define focus styles! */
  35. :focus {
  36. outline: 0;
  37. }
  38.  
  39. /* remember to highlight inserts somehow! */
  40. ins {
  41. text-decoration: none;
  42. }
  43. del {
  44. text-decoration: line-through;
  45. }
  46.  
  47. /* tables still need 'cellspacing="0"' in the markup */
  48. table {
  49. border-collapse: collapse;
  50. border-spacing: 0;
  51. }
  52.  
  53. /* force form controls and tables cells to inherit the correct size (http://www.clagnut.com/blog/348/)*/
  54. input, select, th, td {
  55. font-size:1em
  56. }
  57.  
  58. p
  59. {
  60. margin:0.5em 0 1.5em;
  61. }
  62.  
  63. ul, ol { /*ADDED*/
  64. margin-bottom:1.25em;
  65. }

Report this snippet  

You need to login to post a comment.