A trendy topic amongst CSS’ers is the CSS reset. The idea is that you intercept the default browser stylesheet (that is used first in the cascade), reset, and then apply generic styles including margin/padding. I read many articles by many gurus, but I eventually came out with what I have below.
For differing implementations check out this great “killer collection” of resets, and note that this won’t work in IE6 due to the universal selector but I’m ok with that.
/* Reset Default Browser Styles - Place first in the listing of external style sheets for cascading. - Be sure to explicitly set margin/padding styles. - Styles are not reset that have to do with display (block, inline) are not reset. By: Chris Poteet & various influences */ * { vertical-align: baseline; font-family: inherit; font-style: inherit; font-size: 100%; border: none; padding: 0; margin: 0; } body { padding: 5px; } h1, h2, h3, h4, h5, h6, p, pre, blockquote, form, ul, ol, dl { margin: 20px 0; } li, dd, blockquote { margin-left: 40px; } dt { font-weight: bold; } table { border-collapse: collapse; border-spacing: 0; }
Thanks for the link, Chris! I finally got around to updating my collection with your CSS reset. Great work!
Thanks Jeff!
[…] Chris Poteet’s Reset […]
[…] 1. Reset CSS от Chris Poteet […]
[…] Chris Poteet’s Reset […]
[…] Technique suggested by Chris Poteet […]
[…] dl mempunyai margin 20px 0 , yang belum tentu semua suka oleh perubahan ini dapat dilihat disini […]
[…] ???Chris Poteet’s CSS?? […]
[…] Poteet along with “various influences” created this remarkable technique for resetting default browser styles. Chris recommends placing the reset at the top of your style sheet for optimal cascading results. […]
[…] Ein weiterer Reset ist Siolon’s CSS Browser Reset. […]
[…] sugerida por Chris Poteet’s para Reset […]
[…] CSS Browser Reset by Chris Poteet […]
[…] CSS Browser Reset by Chris Poteet […]
[…] Permalink: https://www.siolon.com/blog/browser-reset-css/ […]
[…] Siolon Browser CSS Reset […]
[…] CSS Browser Reset […]
[…] sugerida por Chris Poteet’s para Reset […]
[…] Reset ?? Chris Poteet. * { vertical-align: baseline; font-family: inherit; font-style: inherit; font-size: 100%; […]
[…] Chris Poteet’s Reset […]
[…] sugerida por Chris Poteet’s para Reset […]
[…] 3. Chris Poteet’s Reset CSS […]
[…] 1. Chris Poteet’s CSS Browser Reset […]
[…] 1. Chris Poteet’s CSS Browser Reset […]
[…] sugerida por Chris Poteet’s para Reset […]
[…] 1. Chris Poteet’s CSS Browser Reset […]
[…] 1. Chris Poteet’s CSS Browser Reset […]
[…] 1. Chris Poteet’s CSS Browser Reset […]
[…] 1. Chris Poteet’s CSS Browser Reset […]
[…] Chris Poteet’s Reset CSS […]
[…] 4 – Chris Poteet’s Reset CSS Técnica de Reset sugerida por Chris Poteet’s […]