Every thing is possible by CSS3, then how I do this by CSS?
(1)
<h2> Top Test Text </h2>
<h2> Test Text <span class="a"></span> </h2>
Apply color: red
to only parent h2
of class="a"
not to top h2,
with out adding <h2 style"color: red">
of with out adding class
There have any CSS Selectors to do that?
I Mean, Parent h2 will red color if .a
class is present on the page.
(2)
<div class="a"> Test Text </div>
<div class="b"></div>
Apply color: red
to only .a
if .b
class is present on the page.