Lesson 17: Nth Child - Help Please?


#1

Not sure what I'm doing wrong! everything I've put in (after first child) is not working.... :frowning:

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:#00FF00;

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


#2

p:first-child, p:nth-child(3), p:nth-child(4) and p:nth-child(5) are all missing closing curly brackets (})


#3

Add closing curly braces } to 5th, 4th, 3rd and 1st


#4

Thanks silly mistake!


#5


p:first-child {
font-family:Cursive;
color:red;
}
p:ntn-child (2) {
font-family:Tahoma;
}
p:ntn-child (3) {
color:#CC0000;
}
p:ntn-child (4) {
background-color:#00FF00;
}
p:ntn-child (5) {
font-size:22px;
}


#6

you can't have spaces between nth-child and (2) (same for 3,4 and 5), also, it is nth-child, not ntn-child. What version of windows are you using? It looks old


#7

thanks im dummy my code was :
p:first-child {
font-family:cursive;
font-
}

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

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

p:fourth-child(4) {
background-color:#00ff00;
font-color:green;
fontsize=12px;
}
lol thanks