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


Will the order in which the CSS rendered affects the inherited elements of any page?

Say I am creating a CSS page. Obviously the elements will be rendered in page top to bottom order. What if I mention/write my inherited value above the CSS original element property?

1 Answer

Rich Salvucci
Rich Salvucci
16,716 Points

If I am understanding your question correctly and your CSS looks like this:

.element {
    background-color: inherit;

.element {
    background-color: blue;

The element will have a background color of blue, because that is overwriting the inherit rule. The inherit background color is initially being set to the User Agent style sheet, which is usually white by default. Does that make sense?