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 Build a Simple Website Creating a Website Structure Using Classes

Ardyce Taylor
Ardyce Taylor
402 Points

adding classes container and clear fix

The challenge was to add a div around the featured-cupcake element and give it the classes container and clear fix. I wrote the following which is wrong because it doesn't have any classes applied to my new div. What did I do wrong?

<div class=โ€œcontainer clearfixโ€> <div id="featured-cupcake"> <h2>Cupcake of the Week</h2> <img src="img/featured-cupcake.jpg"> </div> </div>

We can't see the code you tried to post, check the markdown cheatsheet for posting code.

3 Answers

Ardyce Taylor
Ardyce Taylor
402 Points

Thanks, I actually realized I had forgotten a >

For the challenges, make sure you check your spelling and type exactly as they ask you to.

classes need to be a string with no spaces. If there is a space between clear and fix. the document is looking for class "clear" and "fix" not "clear fix"

Tom Bedford
Tom Bedford
15,645 Points

Hi Ardyce

It doesn't look like your code is showing up correctly, you might want to check out this thread for how to format code in forum posts.