Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress How to Build a WordPress Theme Converting Static HTML into WordPress Templates Convert Custom Post Type Listing Template

Unable 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 href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

        <?php the_field( 'description' ); ?>

            <a class="btn blue" href="<?php the_permalink(); ?>" style="background-color: <?php the_field( 'button-color' ); ?>">
                View  Project &rarr;

.spotlight.project: nth-child(even) {
        margin-right: 0;

1 Answer

Nevermind I got it. I had a space before nth-child. Should be typed as: '''' .spotlight.project:nth-child(even).''''