Reputation: 1490
this css code should only color the background of li tags directrly under the topUl, but it colors the background of all li in the whole unordered list:
ul.topUl > li {
background-color: #ff0 !important;
}
What am I doing wrong?
Upvotes: 0
Views: 41
Reputation: 944157
Presumably, you haven't change the background colour of the descendant li
elements from the default of transparent
.
Upvotes: 1