Reputation: 355
I have a div with the class .fa-times
for which I need display:none
when the body does not have a specific class (e.g. .mm-wrapper_opening
).
I tried:
body:not(.mm-wrapper_opening) .fa-times {
display: none!important;
}
when
<body class="mm-wrapper ext-webkit ext-chrome ext-linux">
Is it possible to check an existing class in a wrapping tag? If yes, what's the correct syntax?
Upvotes: 0
Views: 301
Reputation: 478
check this out !
.fa-times{display:none;}
body.mm-wrapper .fa-times{display:block;}
Use this logic : if body have this class then show
Upvotes: 4