This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS Selectors Forum

View Course

187 points
Picture
Submitted by
Evan Junior
about 2 years ago

17/23 - Bug?

I put the code in and got the right answer but nothing really changes in the preview. Only the first 3 lines had changes. Is this a bug?

Here's my code:

p:first-child {
    font-family: cursive
}

p:nth-child(2) {
    font-family: Tahoma
}

p:nth-child(3) {
    color: #CC0000
}

p:nth-child(4) {
    background-color: #00F00
}

p::nth-child(5) {
    font-size: 22px
}

0 votes

permalink

nope, nth-child(4) background-color should have 2x F, yours only has one

Oh, and use two colons between p and nth-child(5)

2937 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
about 2 years ago


-2 votes

permalink

It should look like this
/Add your CSS below!/
p:first-child {
font-family:cursive;
}
p:nth-child(2) {
font-family:Tahoma;
}
p:nth-child(3) {
color:#CC0000;
}
p:nth-child(4) {
background-color:#00FF00;
}
p:nth-child(5) {
font-size:22px;
}

Regards Dave

195 points
Afa4d994b530fb85c07d112ff33402dd?s=140&d=retro
Submitted by
dshort286
about 2 years ago