I
I
Igor2015-11-06 19:39:02
css
Igor, 2015-11-06 19:39:02

How to spell :nth?

welovepavel.esy.es/1/

.mc_item_wrap_us:nth(0) {
    content: "";
   
    position: absolute;
    margin: -42px 132px;
    border: 20px solid transparent; border-bottom: 16px solid #353535;
    background-color: yellow;
}

.mc_item_wrap_us:nth(1){
        content: "";
 position: absolute;
    margin: -42px 499px;
    border: 20px solid transparent; border-bottom: 16px solid #353535;
    background-color: red;
}

.mc_item_wrap_us:nth(2){
        content: "";
 position: absolute;
    margin: -42px 315px;
    border: 20px solid transparent; border-bottom: 16px solid #353535;
    background-color: green;
}

should work, but it doesn't.
Why?
Thank you!

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ivanq, 2015-11-06
@Ivanq

Not :nth, but :nth-of-type

D
Dmitry, 2015-11-06
@soledar10

jsfiddle.net/soledar10/93z0yup5
jsfiddle.net/soledar10/4ckb8jh7

T
tef, 2015-11-06
@tef

nth-child(2)

V
Vasyl Boyko, 2015-11-07
@ferdasfarmazone

:nth-hild
+ it's possible that you use more pseudo-selectors - after, before

A
Andrey Chursin, 2015-12-02
@AndreyChursin

Learn the mathematical part (Dmitry Potapenko ©)
htmlbook.ru/css/nth-of-type

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question