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

Creating Structure: Code Challenge using classes.

Is it me or is there something wrong with the code challenge I can't seem to pass it on the last task. (It is probably me)

Right here is the question:

Add the classes 'grid_5' and 'omega' to the 'featured-cupcake' element.

This is what I put:

<div class="container clearfix">
    <div class="grid_5 omega">
        <div id="featured-cupcake">
            <h2>Cupcake of the Week</h2>
            <img src="img/featured-cupcake.jpg">
        </div>
   </div>
</div>

This is what error I get:

Oops! It looks like Task 1 is no longer passing.

Are you able to tell me the correct code or just tell me if the code challenge is wrong I want the tick :P.

1 Answer

Hey Brad,

you don't need to wrap around the featured-cupcake div, just add the class next to the id in the featured-cupcake div. Example below:

<div id="featured-cupcake" class="class1 class2">
<h2>Cupcake of the Week</h2>
</div>

I hope that helps.

I see.

Thank you very much I wouldn't of thought it would of made a difference. But I never use id's unless I use javascript.

No problem. I'm glad I helped you out.