Assume the following code:
<div class="foobar" ....> // target
<div class="foobar" ...>....</div>
</div>
<div class="foobar" .... >....</div>
Now I want to assign a new CSS rule to only the first element which has the class “foobar”. In the sample above the
with “target” as comment.
How can I address this?
How can I address this?
[foobar]:first { color: red }
or
.foobar:first { color: red }
do not work