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

09.18.2005
| 14519 views |
  • 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;
}
    

Comments

Snippets Manager replied on Tue, 2007/10/09 - 10: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;