I have an element in my HTML <div class="TreeView"></div> I would like apply style to tags: td, div, table for a specific Class Role: TreeView
At the moment this my code does not work.
td.TreeView, div.TreeView, table.TreeView
{
height: 20px !important;
border-collapse: collapse;
border-spacing: 0px;
margin: 0px;
padding: 0px;
}
The only way I’m able to make it work is: apply an ID to my div <div id="MainContent_uxTreeView" class="TreeView"></div> and use this css code instead:
#MainContent_uxTreeView table, #MainContent_uxTreeView td, #MainContent_uxTreeView div
{
height: 20px !important;
border-collapse: collapse;
border-spacing: 0px;
margin: 0px;
padding: 0px;
}
I would like not to use the second version mentioning the ID.. so what I’m doing wrong here?
Thanks guys for your help!
It seems that you need to apply CSS rules for descendants of
.TreeView: