D
D
Dubrovin2018-02-13 11:18:56
css
Dubrovin, 2018-02-13 11:18:56

How to select a selector with CSS?

There is this HTML:

<div class="btnGroup">
    <input class="btn__input">
    <label class="btn"></label>
    <input class="btn__input">
    <label class="btn"></label>
    <input class="btn__input">
    <label class="btn"></label>
</div>

How to use CSS to select the first label through btnGroup? You can't use the label tag, because we use the BEM methodology (today it's a label, but tomorrow it can be a div or something else)
ps The task is very simple - remove the rounding from the buttons in the group that are between the first and last buttons.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2018-02-13
@Dubrovin

fix quotes)
.btnGroup .btn:first-of-type

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question