There are a number of resets around but I tend to use a minimalist version pertinent to the design in hand. I don’t see the point of adding in thousands of rules that will never be used.
I usually start with something like this although its not set in stone.
/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* main CSS Document */
html, body, table {
margin: 0;
padding: 0;
font-size: 100%;
}
object, iframe, blockquote, h1, h2, h3, h4, h5, h6, p, dl, dt, dd, ol, ul, fieldset, form, legend, table, caption, th, td {
margin: 0;
padding: 0;
border:none;
}
article, aside, figure,figcaption footer, header, nav, section, details, summary, main {
display: block;
}
ol {
list-style:outside decimal;
margin-left:1.5em
}
ul {
list-style:outside disc;
margin-left:1.5em
}
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align:top;
}
/* clearing technique */
.clearfix:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
* html .clearfix{zoom:1.0}
*+html .clearfix{zoom:1.0}
a img, img {border:none;display:block}/* remove borders from linked images and set as block by default*/
a {text-decoration:none;}
a:link {color:#f00}
a:visited {color:#f00}
a:hover {text-decoration:underline;}
a:focus {outline:1px dotted #ccc}
/* clear extra padding on moz inputs */
input[type="submit"]::-moz-focus-inner {
padding: 0;
border: none;
}
input, textarea, select, label {
font-family: Arial; /* set font-family for IE*/
vertical-align:middle;
}
textarea {
resize:vertical;
overflow:auto
}
.offscreen {
position:absolute!important;
left:-999em!important;
top:-999em!important;
}
You may want to use this method of box-sizing if you are having modules installed from other sources and there are also some newer clearfix methods around but as they utilise both before and after pseudo elements then I find them less useful as I am always using before and after on elements for special effects.
The ‘main’ element is a new html5 element and the older resets don’t have it in place. You do need to set it to display:block (as with all the other html5 elements) as all html elements are inline by default. It’s the UA that applies the block display and so only the newer browsers will have it added to the default stylesheet. (Note for html5 elements you do need the html5shiv for ie8 and older).