Posted By

apphp-snippets on 03/10/13


Tagged

css browser settings reset


Versions (?)

Resetting the Browser Default Styles in CSS


 / Published in: CSS
 

URL: http://www.apphp.com/index.php?snippet=css-reset-browser-default-styles

Using the same code in different browsers can be displayed in different ways. Resetting styles will help you to avoid such problems.

  1. <style type="text/css">
  2. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code
  3. , del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
  4. { margin:0; padding:0; border:0; font-size:100%; font:inherit; vertical-align:baseline; outline:none; }
  5. html
  6. { height:101%; } /* always show scrollbars */
  7. body
  8. { font-size:62.5%; line-height:1; font-family:Arial, Tahoma, Verdana, sans-serif; }
  9. article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
  10. { display:block; }
  11. img
  12. { border:0; max-width:100%; }
  13. a
  14. { text-decoration:none; }
  15. a:hover
  16. { text-decoration:underline; }
  17. ol, ul
  18. { list-style:none; }
  19. blockquote, q
  20. { quotes:none; }
  21. blockquote:before, blockquote:after, q:before, q:after
  22. { content:""; content:none; }
  23. strong
  24. { font-weight:bold; }
  25. input
  26. { outline:none; }
  27. table
  28. { border-collapse:collapse; border-spacing:0; }
  29. </style>

Report this snippet  

You need to login to post a comment.