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 trialLuke Plourde
8,793 Pointsnth child has been applied but the 4th image still pushes the 5th image to the bottom left. What can be done?
@media screen and (min-width: 480px) {
/********************************
TWO COLUMN LAYOUT
*********************************/
#primary {
width: 50%;
float: left;
}
}
#secondary {
width: 40%;
float: right;
}
/********************************
PAGE: PORFOLIO
*********************************/
#gallery li {
width: 28.3333%;
}
#gallery li: nth-child(4n) {
clear: left;
}
@media screen and (min-width:660px) {
}
3 Answers
Luke Towers
18,572 PointsYou appear to have a typo in your selector:
#gallery li: nth-child(4n) {
should be
#gallery li:nth-child(4n) {
(no space after the li and before the :pseudo-class)
Luke Plourde
8,793 PointsThanks so much! That seems to have fixed it.
Luke Towers
18,572 PointsNo problem, happy to help!
Mobolaji Kamson
1,421 Pointsthats a very subtle difference between pseudo-class and the : for properties and values.