Answers for "if not class css"

CSS
1

apply css if class not present

.container:not(.container2) > .myDiv {
  color: red;
}
Posted by: Guest on August-31-2021
11

css not class

/* Style everything but the .different class */
li:not(.different) {
  font-size: 3em;
}
Posted by: Guest on April-16-2020

Browse Popular Code Answers by Language