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.

CSS

Colton Mountain
Colton Mountain
649 Points

Where am I going wrong?

Hello! So, I'm very new at this and I'm in the process of learning CSS, but I can't get past this one level when working with grids!

My error message keeps saying: "The 'featured-cupcake' element has one correct class, but is missing the second."

When my task was: Add the classes 'grid_5' and 'omega' to the 'featured-cupcake' element.

This is my code:

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

Sorry! I know it's probably the most simple thing!

4 Answers

Tom Bedford
Tom Bedford
15,645 Points

I would check if you have added the class "grid_5" or not :)

Joshua Werkmeister
Joshua Werkmeister
7,821 Points

Tom's suggestion is probably correct. You can add multiple classes to an element using spaces. class="grid_4 grid_5 omega"

I have this same issue and I have not found a solution

Mohammed Hossen
Mohammed Hossen
5,591 Points

<div id="featured-cupcake" class="grid_4 omega">

When my task was: Add the classes 'grid_5' and 'omega' to the 'featured-cupcake' element.

so your task ask for grid_5 and you have grid_4, maybe that's what is causing the issue. Also make sure you have linked to the stylesheet properly.

Colton Mountain
Colton Mountain
649 Points

I am such an idiot, I was so busy looking for something more complex that I didn't even notice the obvious. Thank you so much!