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

Stuck on Simple Website CSS?

Is there some kind of quick guru or moderator around who takes questions? I have been through the CSS challenge about ten times and I'm stuck on task 2. I'm supposed to add "grid_5" and "omega" classes and keep failing at it. I really can't figure out what I'm doing wrong, anyone?

Okay this is everything I've tried:

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

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

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

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

Anybody see what I did wrong? Thank you!

7 Answers

Matt Campbell
Matt Campbell
9,767 Points

When you give a div a class, you can pass as many CSS styling instructions as you like simply by putting a space between each instruction.

For example:

<div id="examplediv" class="alpha beta charlie delta">

    <p>Div content goes here!</p>

</div>

I hope this helps you on your way!

Really no good answer here. I am having the same problem and these suggestions don't work. Seems the video is not good at explaining this.

Hi Alison,

I hope you are well. The best thing you can do is posting your code, then we can take a look at it and see what the issue is.

Thanks!

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

add those classes to the other div nested inside the one you created.

I also tried this every way you guys suggested.

I think there might be something wrong with the program.

Is there a place we can check to make sure that's working?

I just figured this out and I think it is a simple misunderstanding of terminology for us beginners as well as a case of this stuff being glossed over pretty quick in the videos.

The "featured cupcake element" is this:

<div id="featured-cupcake">

To fulfill the task you simply have to add a div class to that same line:

<div id="featured-cupcake" div class="grid_5 omega"

Didn't come out clear for some reason ... bad typing probably.

Basically, you from this: <div id="featured-cupcake">

to this: <div id="featured-cupcake" div class="grid_5 omega">

Well I guess they just block you from posting the solution ... hope you can figure it out from what I posted. Add the div class to the same line as the div id.

Hi Julio:

I saw your answer in the email, thank you! I never would have figured that out from the instructions.

When you post code you have indent every line four spaces in so it prints it as code instead of marking it up. It's "markdown' as opposed to "markup" :)

Thanks again!

Yayyyy I completed the challenge!! Thanks all!