A better CSS reset stylesheet

If you aren’t a web developer then you may not know this, but browsers are a mess. Every browser picks and chooses how it wants to render the same HTML. For examples, some browsers don’t have any default margin on the body. Some do, but with varying amounts of margin. Internet Explorer is of course the worst offender, and there are many versions of Internet Explorer still widely used.

To get around these issues, web developers typically use what is commonly called a reset stylesheet. This CSS file resets all of the default styles for all the possible HTML elements, so that you have a blank slate to start with. They’re a bit of a pain to use because they require the web developer to then define what they want the styles to be for everything. For example, they typically wipe out padding and margins on all elements, so you have to set padding and margins on all elements if you don’t want them squished together.

Fortunately some smart people created something even better than a reset stylesheet: normalize.css. Instead of resetting all the default styles, normalize.css selectively sets reasonable styles only for the elements that need it. It keeps all the default styles that are already in use by the majority of browsers. You can get it for free here.

Leave a Reply

Your email address will not be published. Required fields are marked *