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 trialJessica Perry
1,687 PointsFinal Challenge : #ingredients using Inherit property in padding.
In the last challenge asked for " CSS Box model (how to)" video, I used "inherit" instead of a number of pixels. This showed the same visual results as the mock up.
#ingredients {
background-color:#f3eeea;
padding:inherit;
border-radius:10px;
}
Reviewing what inherit means ," causes the element to take the computed value of the property from its parent element", would this mean that it is inheriting from the Main element?
1 Answer
Steven Parker
231,269 PointsYou forgot to link your question to the challenge so we could look at the HTML part of the code. But if the element with id "ingredients" is a direct child of main, then "inherit" would indeed copy the value from the main element. Otherwise, it would inherit from the next element in its ancestry (the direct parent).
For future questions, you might want to take a look at this video about Posting a Question.