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 CSS Basics (2014) Getting Started with CSS External Style Sheets

Diego Villaseñor
Diego Villaseñor
12,615 Points

Hi, On another video Nick used two stylesheets, one to normalize and the other to apply a new style. Is that necessary?

I mean, to normalize the different browser's default stylings. Is that always necessary or in which cases would that be the important?

Thanks

It's certainly a good idea. Normalise provides consistency across a range of browsers which otherwise could look very different for a given CSS layout.

3 Answers

Ariel Aronica
Ariel Aronica
6,646 Points

Every browser comes with it's own base stylesheet... these bases are not necessarily consistent and may counteract some of the styles in your stylesheet. You want to start with a clean slate, and by attaching the normalize stylesheet, you are provided with this clean slate. In one of the later courses under "CSS Layout Techniques," Guil actually edits a normalize stylesheet. I highly recommend taking the course.

Simeon Brazzell
Simeon Brazzell
2,008 Points

Normalize is an easy way to set up some basic styles that will work across all browsers. It sets up the basic behaviors you'd expect to see in any website. He placed that one first in the html doc so that the Main.css file he was using could override any styles. Hence the term "Cascading Style Sheet". The one placed furthest down in the html doc gets preference, but if there are no new rules the previous one's rules apply

It is not necessary, but it is very common to do so.

Many of us have a normalization stylesheet that we have developed over time with our preferences etc to remove specific browser inconsistencies. Some people just have a like a few normalizations and will just list them at the top of their main stylesheet instead of in a separate stylesheet.