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

Need Help With "Code Challenge: Using Classes"

So here is my source:

http://pastebin.com/hSaLm2nW

can anyone please tell me what i am doing wrong..

5 Answers

@Jodi -

Step 1) Start back at the beginning with this code

<div id="featured-cupcake">
    <h2>Cupcake of the Week</h2>
    <img src="img/featured-cupcake.jpg">
</div>

Step 2) Create a div with the classes container & clearfix

Step 3) Add a closing div tag so encloses the div with the ID of featured-cupcake

Step 4) Add the classes grid_5 & omega to the existing div which has an ID of featured-cupcake

The instructions for reference:

Add a 'div' around the 'featured-cupcake' element and give it the classes 'container' and 'clearfix'.

This is the relevant code ...

<div id="featured-cupcake">
    <h2>Cupcake of the Week</h2>
    <img src="img/featured-cupcake.jpg">
</div>

What this means is ...

  • Create a new div which wraps around the feature-cupcake div
  • Add container & clearfix
  • Don't forget to close your new div

Remember: to read the instructions closely and only write code required to complete that specific task.

For future reference it's easier if you create a "working" example using codepen.io.

where my issue lies is "Add the classes 'grid_5' and 'omega' to the 'featured-cupcake' element."

Thank you so much james. That was a HUGE road block.

@Jodi - You are very welcome.