DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Clear Browser's Default Styles

  • submit to reddit
* {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: sans-serif;
  font-size: 1em;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;


Snippets Manager replied on Tue, 2007/10/09 - 9:10am

I use this very often on most sites i design to reset the styles in all browsers to make them render pretty much the same. I also like to add: line-height: 1.4em;