Ben Monastyrsky Ben Monastyrsky - 1 year ago 118
CSS Question

Target everything except a certain class

table, th, td {
border: 1px solid black;
border-collapse: collapse;
th {
font-family: arial;
font-weight: normal;
<table width="200" height="300">
<tr style="font-weight: bold">

Is there a way to make CSS target everything EXCEPT a certain class?
I would like it to target every th tag EXCEPT a certain class.

Answer Source

you can use :not

li:not(.different) {
  font-size: 13px;


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download