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
Jay Azar
9,147 PointsCSS parent container
what is the CSS parent container? If I have some <li> elements inside the <nav> element, is the <nav> parent container of those <li> elements?
1 Answer
Jeff Lemay
14,268 PointsExample:
<div class="container parent">
<ul class="parent-of-li child-of-container">
<li class="child"></li>
<li class="child"></li>
<li class="child"></li>
<li class="child"></li>
<li class="child"></li>
</ul>
</div>
Jay Azar
9,147 PointsJay Azar
9,147 PointsThanks Jeff! So in your example, <div> is the parent of <ul>, and <ul> is the parent of <li>, is the <div> also the parent of <li>?