scottjenson, #CSS challenge!
<body>
<div class="container">
<div class="item">item 1</div>
<div class="item">item 2</div>
<div class="item">item 3</div>
<div class="item hidden">item 4</div>
</div>
</body>where .hidden { display: none }
Question: Can I use item:last-child {} to stylize item 3?
Apparently :last-child targets the last child in the DOM, not the last visible child. (this means hidden item 4 is styled.
Is there any way to do this using only CSS?
Add comment