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 trialSam Young
319 PointsAdd the classes 'grid_5' and 'omega' to the 'featured-cupcake' element.
<body>
<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>
</body>
6 Answers
Zach Cooke
1,681 PointsYou can place a class within the id line. This will allow the command to pass. For example: <div id="featured-cupcake" class="grid_5 omega">
Kevin Korte
28,148 PointsYou can add two classes to an element by putting a space between them, like so:
<div class="class-1 class-2"></div>
Sam Young
319 PointsThanks Kevin. But my computer crashed so I didn't have a chance to complete my question.
I'm working on "Add the classes 'grid_5' and 'omega' to the 'featured-cupcake' element."
here is the code for it - when I submit it - the auto response tells me "Oops! It looks like Task 1 is no longer passing." (Task One was "Add a DIV for "container" and "clearfix")
<body> <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> </body>
David Newcombe
4,544 Pointsdid you change the code from task 1 at all?
Sam Young
319 PointsThanks Kevin. But my computer crashed so I didn't have a chance to complete my question.
I'm working on "Add the classes 'grid_5' and 'omega' to the 'featured-cupcake' element."
here is the code for it - when I submit it - the auto response tells me "Oops! It looks like Task 1 is no longer passing." (Task One was "Add a DIV for "container" and "clearfix")
<body> <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> </body>
Kevin Korte
28,148 PointsSorry to hear about your computer. : /
It sounds like they want you to wrap the featured cupcake element inside of another div with the two classes "container", and "clearfix". Is the featured-cupcake element a picture? I do not remember this challenge too well.
I'l focus on getting the first challenge to pass first. Let me know
Sam Young
319 PointsThanks for your help everyone. Zach's comment was most helpful. Instead of three stand alone items for each: <div class="container clearfix"></div> <div class="grid_5 omega"></div> <div id="featured-cupcake"></div>.
....it seems the computer wanted this: <div class="container clearfix"></div> <div id="featured-cupcake" class="grid_5 omega"></div>.
Brandy Casuse
Python Web Development Techdegree Student 2,019 PointsI too am having trouble passing this challenge. Can someone explain it to me?
James Barnett
39,199 PointsHere's a hint, sometimes you don't need to add an extra <div>
. In this case, add the 2 needed classes to the element with the specified id.