CSS3: selector nth-child () does not work

I am learning HTML and CSS from codecademy. there on a exercise I coded :

    

heading

yuvt q

hdtrgggfdrr

jwiox

and as css I typed :

.fancy{
font-family:Cursive;
color: violet
};
#serious{
font-family:Courier;
color:#8c8c8c
};
body :nth-child(4) {
font-size: 26px;
}

here I wanna make third paragraph of size 26px, which is 4th child. but the code is not working. I haved discussed a lot in codecademy forum but still it is not working any suggestions.

Your issue is incorrect formatting on the css. Each statment must end in a semicolon, but there should be no semicolons after the brackets. Like this:

.fancy{
    font-family:Cursive;
    color: violet;
}
#serious{
    font-family:Courier;
    color:#8c8c8c;
}
body :nth-child(4) {
    font-size: 26px;
}
Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » CSS3: selector nth-child () does not work

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录