CSS Reset, how to start from the same base
Even if standards are set up browser don’t use the same standards style. For example the margin-bottom on a paragraph in IE hasn’t the same amount of pixel than in Firefox.
So to start on a fresh base we use CSS reset. Take off evrything and rebuild all the style you need. A comon technique is using the * selector:
*
{
margin:0;
padding:0;
}
This is very simple and reset pretty much everything that is set up originaly in the browser. Now if you want to get a more efficient and selective reset theire is some out there that can help you.
The one I personaly use, and I think is the most famous CSS reset, is developed by Eric Meyer: http://meyerweb.com/…/reset-reloaded/.
This is a radical reset. Provides a fresh base to start, but takes off to much in my opinion so here is my version of CSS reset from Eric’s:
/* CSS Reset by Eric Meyer */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, form, label, table, caption, tbody, tfoot, thead, tr, th, td
{
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus
{
outline: 0;
}
html
{
overflow-y: scroll;
}
body
{
line-height: 1;
color: black;
background: white;
}
ol, ul
{
list-style: none;
}
a img,:link img,:visited img
{
border: 0;
}
/* tables still need 'cellspacing="0"' in the markup */
table
{
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td
{
text-align: left;
font-weight: normal;
}
/* End of Reset */
Pretty much the same except that I have taken Fieldset and Legend off the main reset because I like the original style of them. I have also added the trick to manage the scroll bar (See Avoid scroll bar moving effect for more details). I have taken off the part on blockquote as I try to stay away from using CSS to add content to my page, doesn’t seems right to me.



Yes, the Meyer reset is one of the better resets available today, in my opinion. Of course, there are many other excellent CSS resets from which to choose. Cheers!