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!

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


adding classes to an element

I am unable to pass one of my challenges and cannot for the life of me see what is wrong with my code. It keeps telling me Bummer! You're missing both classes on the 'featured-cupcake' element.

Can any one tell me what I am doing wrong?

Build a Simple Website Creating a Website Structure Using Classes

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

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

2 Answers

Chase Lee
Chase Lee
29,275 Points

I remember having problems on this one too. Try doing this:

<div class="featured-cupcake grid_5 omega"></div>

thanks very much I was trying to add the grid_5 and omega to a seperate <div>

Can't see your version of the code. But i think you'll figure out what you did wrong when having a look at the solution:

<div class="grid_5 omega" id="featured-cupcake">

thanks I was trying to place it in a seperate <div>

how did you get the code to show in your reply

You have to indent each line by a tab or 4 spaces. Click on Cheatsheet under the Replybox to to see how you can format your Reply