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 trialJay Pirom
3,707 PointsWhat is parent element?
What is parent element?
3 Answers
Jonny Noble
11,165 PointsFor example - body is a parent to header, main, footer etc.
Jay Pirom
3,707 PointsThank you! I'm a bit confused with the question, "Why should images be set to a max-width of 100%?" The answer is that it will fill their parent element. What does this mean?
altair
6,548 PointsIt means that the image will fill the entire space of the element one level above it.
For example:
<body>
<div>
<img>
</div>
</body>
Here the div element is the parent of the img tag, and the body element is the parent of the div tag.
Jay Pirom
3,707 PointsThank you! I got it now.