CSS Mini Reset

Thursday, May 20, 2010 { 25 Comments }

/* CSS Mini Reset */



html, body, div, form, fieldset, legend, label

{

margin: 0;

padding: 0;

}



table

{

border-collapse: collapse;

border-spacing: 0;

}



th, td

{

text-align: left;

vertical-align: top;

}



h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; }



img { border: 0; }

Responses to “CSS Mini Reset”

What is CSS Reset?CSS Reset usually aims to reduce browser inconsistencies by evening up the CSS default settings in all browsers.The most used CSS Rests areLast week I spotted " CSS Reset – a simpler option " by Russ Weakley.Russ made few smart observations: we don’t always need complete CSS reset because CSS Reset file can become very large and we often forget to set all the styles.Also in my opinion we don’t always use all the CSS and HTML tags, when was the last time when you used “address” tag?In many cases the complete CSS Reset makes perfect sense like in the case of some CSS Framework.I used Eric Meyer Reset for my CSS Framework ( Emastic and The Golden Grid ).In other my project complete CSS reset doesn’t make sense ( Malo 1 line CSS Framework ).My point is different projects(sites) can be approached differently, and not always we need complete CSS reset.I wanted to make Mini CSS Reset who will focus on the main CSS features like Divs , Tables and Forms who are also the most used CSS(HTML) elements.And here is the result:You can compare:You can use CSS Mini Reset when you actually don’t want to reset everything just the fundamental HTML elements.Any suggestions?