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 CSS Selectors Advanced Selectors :nth-of-type

Sardor Latipov
Sardor Latipov
5,609 Points

I am stuck on the second objective here. Can someone help please

4 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Sardor,

You're so very close... instead of a dash (or minus sign), you need the + (plus) sign in the pseudo-class selector. (3n+4). Think of it as you want to add (advance) each step.

img:nth-child(3n+4) {
    clear: left;
  }

Keep Programming! :) :dizzy:

Steven Parker
Steven Parker
231,248 Points

:point_right: Close, but you need a "+" not "-".

You also need the img tag name before the pseudo-class:

  img:nth-child(3n+4) { clear: left; }

Help please! It keeps asking me if I am floating the images left? This is my answer: @media (min-width: 607px) { img:nth-child(3n+4) { float: left; clear: left; } }

Travis McCallum
Travis McCallum
5,109 Points

For those who got stuck on this challenge. There are two separate img rules you need to make.

@media (min-width: 607px) { img{ float: left; }

img:nth-child(3n+4){ clear: left; } }