I understand that having:
<div class="house big"></div>
<div class="house"></div>
I can select the second one like this:
.house:not(.big){}
But what exactly can I pass that :not()
? For example, having this:
<label>
<span>Label</span>
<input type="text">
</label>
<label>
<p>Label</p>
<input type="text">
</label>
I wanted to select all spans that are previous to inputs. As there is no previous sibling selector (I hope it will in the future), I tryed to do this without success:
span:not(span+input){}
But my Chrome doesn't seem to like it. Is my logic wrong here or simple this isn't the way :not() is supposed to work?
This is a question about the use of :not()
, I know I can do label span:first-child{}