Universal Selector ‘*’ Reset

When first approaching the CSS Reset method, it seems to many that the easiest way to reset styles is to use the “universal selector” to set the margin and padding on all elements to zero – as well as any other properties specified – with only a few lines of code. As you shall see, this pint-sized CSS Reset is fraught with problems…

At its most basic, the Universal Selector CSS Reset looks like this:

* {
	margin: 0;
	padding: 0;
}

This diminutive CSS Reset employs the universal selector (*) to reset the padding and margins on all elements to zero. It is often expanded to include border: 0; outline: 0 to also reset these values to zero, nada, zilch. The implications of this can be huge, and so this method should never be used unless you know exactly what to expect…

Click to jump to some code examples & scripts, or keep reading for some discussion