Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Alex Watts
Alex Watts
8,396 Points

Remove all default CSS properties from browser.

Hello,

I am trying to build a CSS framework for my projects. I was wondering which is the best way to remove or reset the browsers default CSS properties. I know you can write out each HTML element in a CSS file, but that seems too wearisome especially as there are so many tags available. What would you advise/recommend?

Thanks!

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I'd say that your best bet is to use normalize.css. Some browsers (and even some versions of the same browsers) have some interesting CSS rules that can make a site look different on one than on the other. Normalize.css is used by some big sites including (but not limited to) Twitter.

The idea here is to give the same CSS rules across all versions of all browsers giving you a sort of "blank slate" to work with. This helps ensure that the site you are building looks the same across browsers (and versions of browsers).

You can find normalize.css here. It is, of course, free to use. Down at the bottom of this page you can see more big sites that use it.

Hope this helps! :sparkles:

Seth Kroger
Seth Kroger
56,413 Points

It sounds like you may be looking for the "Meyer reset", one of the more popular alternatives to normalize.css. It's not better or worse then normalize, just a different approach. Instead of smoothing out the differences, it literally zeros out everything. It leaves you as close to a blank canvas to override with your own styles as possible.

Alex Watts
Alex Watts
8,396 Points

Thanks Jennifer and Seth! Considering either creating a 12 or 16 column grid, which would you advise to be the better option.