Jan 29, 2009
Reset it, and forget it!
CSS reset stylesheets are designed to set default elements to a common baseline to reproduce identical pages across a variety of browsers. Have you felt the agony of float drops? Bemoan at the sight of inconsistent spacing? Gnash your teeth because of boring browser default styles? Solve some of these inconsistencies before wading knee-deep code.
Instead using an entire reset stylesheet, I’ve chosen a few selectors to zero out at the very beginning of the styles, making this a flexible option for resetting. Don’t worry about over-writing the styles; changing the reset styles is automatic, as long as the changes are made after your reset (further down in the stylesheet).
Code:
body, html, div, blockquote, img, label, p, h1, h2, h3, h4, h5, h6, pre, ul, ol,
li, dl, dt, dd, form, a, fieldset, th, td
{
margin: 0; padding: 0; border:0; outline: none;
}
Mix ‘n match, add, delete, augment, diminish, and hack away until your heart beams with pride. Check out Eric Meyer’s version on a proper CSS reset.





Leave a Reply