Reputation: 355
css:
.a .b { position: relative; }
.c { position: relative; }
Then I though it would work the same way if I wrote it like this:
.a .b .c { position: relative; }
however, it doesn't, it has no effect about .c
. So why it's not working when I put them together?
Upvotes: 1
Views: 77
Reputation: 6917
what you want is
.a .b, .c { position: relative; }
.a .b .c
expects this
<div class="a">
<div class="b">
<div class="c"></div>
</div>
</div>
having a comma means .a .b
OR .c
Upvotes: 5