Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Sahou Kanaan Almelhem
PLUS
Sahou Kanaan Almelhem
Courses Plus Student 15,547 Points

pseudo-element or pseudo-class :nth-of-type is unknown by W3C CSS Validator

sub-nav li:nth-of-type(2n){

padding-left:3px; padding-right:3px; border-left: 1px solid #fff; border-right: 1px solid #fff; }

2 Answers

Steven Parker
Steven Parker
231,269 Points

Be sure the "Profile" setting is CSS Level 3,

The ":nth-of-type" pseudo-class was first introduced in CSS3.

I pasted that directly into the The W3C CSS Validation Service and got: "Congratulations! No Error Found."