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.

HTML

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">
...
</div>

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