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 trialEmy Ng
8,035 Pointscascading rule in main.css
I have a main.css file with many rules. The first rule is for anchors: a { text-decoration: none; color: #6ab48f; }
follows by more rules for headers, paragraphs and so on. What if there is another rule also for anchors later on:
a { color: #6ab47b; } My question will be: will the next rule for a override the color property for the first anchor rule?
1 Answer
Phillip 25A
4,963 PointsEmy.
Yep.
If you have two rules that have the same level of specificity then the latest one will override the first one.