deelite
deelite

Reputation: 355

CSS property for a HTML tag when body has not class

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

Answers (1)

Gurkan Atik
Gurkan Atik

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

Related Questions