html - about css ul properties -
if specify like
.a ul{} .a ul li{} and
.b ul{} .b ul li{} will properties of ul in .b totally separated properties of ul of .a? or common?
i want the styles of ul stays totally separated style of ul in .b without using div id. thanks.
as long ensure in html don't have class="a" elements inside class="b" elements or vice versa, selectors apply separate <ul>.
they common <ul>s in both .a , .b if:
you group selectors, this:
.a ul, .b ul {} .a ul li, .b ul li {}you declare exact same style rules both selectors
in html,
<ul>contained within elements of both classes (whether it'sclass="a b"or.ainside.bor.binside.a), example:<div class="a b"> <ul><li>item</li></ul> </div> <div class="b"> <div class="a"> <ul><li>item</li></ul> </div> </div> <div class="a"> <div class="b"> <ul><li>item</li></ul> </div> </div>note applies if second bullet true; may not results expect due effects of the cascade.
Comments
Post a Comment