Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
hamza shaikh5,875 Points
why to add normalize css file? and what is it?
ok i'm just curious that why we have to add this file in our folder. what does it really do?. does this file enable me to add css? and i can't add css without this file? i will really appreciate if you clear this up for me. thank you in advance
Every web browser has a default styling for all html element different from browser to browser.So if you want to create your own styling in a webpage without any conflicts from the default styling, you must reset your styling with normalize.css or reset.css for example, and after that adding your own css.
Isaac Asante4,752 Points
To add to John's explanation, your custom CSS file should be placed AFTER the normalize.css file in your site's header in order for your changes to reflect. This is all because of the cascading nature of CSS. If you place normalize.css in your header after your custom CSS file, your changes will be overwritten for all elements selected in the normalize file.
Normalize.css basically levels the playing field for all browsers. For instance, Google Chrome might add more padding to elements than Internet Explorer, so normalise.css just makes all browsers that include this file all have the same content, margins, spacing etc.
Hope this helps
So then, is normalize.css always going to be the same file (as far as content goes)? Or are there plausible situations in which i would have to re-create it from scratch for a given project (for optimization purposes perhaps)?