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 trialAndrea Sorrell
4,736 PointsUnable able to make the .spotlight.project: nth-child(even) alignment work
Can someone help me figure this out? I am unable able to make the .spotlight.project alignment work for me. My projects are still tiling down and not across. Here is my code for work.php and style.css. Everything looks ok but maybe I can't see my typo.
<div class="grid_6 spotlight project" style="background-color: <?php the_field( 'background-color' ); ?>">
<a href="<?php the_permalink(); ?>">
<img src="<?php the_field ( 'homepage_slider_image'); ?>">
</a>
<h4>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h4>
<?php the_field( 'description' ); ?>
<p>
<a class="btn blue" href="<?php the_permalink(); ?>" style="background-color: <?php the_field( 'button-color' ); ?>">
View Project →
</a>
</p>
</div>
.spotlight.project: nth-child(even) {
margin-right: 0;
}
1 Answer
Andrea Sorrell
4,736 PointsNevermind I got it. I had a space before nth-child. Should be typed as: '''' .spotlight.project:nth-child(even).''''