How to select question for all but first select with CSS?

Spread the love

To select question for all but first select with CSS, we use the :not pseudoclass.

For instance, we write

.options > div:not(:first-child) select {
  background: yellow;
}

to select any div but the first with div:not(:first-child) in the elements with class option.

And we select the select element inside the selected divs.

Leave a Reply

Your email address will not be published. Required fields are marked *