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

Build a Simple Website Stage 3 adding a new div

It's telling me to add a new div around the featured cupcake img element with the classes class="container clearfix". But both the image and the h2 header are already wrapped in a div with the id="featured-cupcake". I've tried simply adding the class to the existing div, closing out the existing div above the img element and creating a new div with the classes just around the img element, and deleting the existing div altogether and just leaving the new one wrapped around only the img element and the editor won't accept any of them and now I'm stuck!

1 Answer

It's looking for you to encapsulate the featured-cupcake element in a new div. The current div with the id="featured-cupcake" should be inside the new div that you create.

It should look like the following:

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