Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to get the CSS :not() selector working in IE and Chrome?

Anyone know any tricks to use the CSS :not() selector in IE and Chrome?

e.g. this works in Firefox: iframe:not(.anifrmclass){}

Cheers!

like image 238
phillyville Avatar asked Jan 21 '23 21:01

phillyville


1 Answers

Specificity is your friend. Apply your :not(.anifrmclass) styles to all <iframe>s then override with other values for <iframe class="anifrmclass">.

iframe {
    /* Styles for all -other- iframes */
    display: none;
}

iframe.anifrmclass {
    /* Override for this class with values other than the above */
    display: inline-block;
}
like image 163
BoltClock Avatar answered Jan 31 '23 07:01

BoltClock