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

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!