Hiding a div based on parent div - Possible?
Posted: Fri, 2008-10-10 19:21
I have a div that I want to display in one view, but not the other. Is something like this possible:
<div ID="View_1">
<div CLASS="Hide_in_view_1">
</div>
</div>
<div ID="View_2">
<div CLASS="Hide_in_view_1">
</div>
</div>
What would the css code be? Something like:
div.Hide_in_view_1 {
display: none;
}
But this would hide in both views... Please help!
Thank you!


Moderator
Posts: 12583
Joined: 2004-06-06
Location: London
Descendent
Posted: Fri, 2008-10-10 20:48
Descendent selectors!
#view_1 div.Hide_in_view_1 {display:none;}
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me