Reputation: 1051
Every ul
with the class .here
will have these styles.
ul.here{
border-left: solid 2px #c2c2c2;
padding-left:5px;
}
However....
I would like the ul
div #nav-sub
with the class here to have these styles.
ul#nav-sub.here{
border-left: solid 2px #c2c2c2;
padding-left:5px;
}
How do I get this to work ?
Upvotes: 0
Views: 104
Reputation: 9476
I guess from your description that
ul#nav-sub .here
could be the right CSS selector, as long as #nav-sub is unique as an id on this page.
Upvotes: 3
Reputation: 3384
I think this is what you are looking for:
ul.here{
border-left: solid 2px #c2c2c2;
padding-left:5px;
}
ul.here #nav-sub{
border-left: solid 2px #c2c2c2;
padding-left:5px;
}
HTML
<ul class="here">
<li>item</li>
<li><div id="nav-sub">nav-sub</div></li>
</ul>
Upvotes: 0