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

Thaddeus Castain
Thaddeus Castain
303 Points

Problem with adding classes of "grid_5 and omega".

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Smells Like Bakin' Cupcake Company</title>
  <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
  <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
</head>

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

Thank you Steven, whoswho and Adam. After I applied these measures you suggested, I was able to complete the assignment and move on to the next section.

3 Answers

Steven Deutsch
Steven Deutsch
21,046 Points

Hey Thaddeus,

What exactly is giving you trouble? Can you post your code so that I can try and assist you? You can add multiple classes to elements by separating them with spaces. For example:

<div class="nameofclass1 nameofclass2"></div>

Hope this steers you in the right direction. Good luck!

Thaddeus Castain
Thaddeus Castain
303 Points

Thank you Steven, whoswho and Adam. After I applied these measures you suggested, I was able to complete the assignment and move on to the next section

The question is asking you to add the classes TO the featured cupcake element. So try the code below. Also I edit your post with correct markup for embedding code if you now click edit you can see how it is done :)

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Smells Like Bakin' Cupcake Company</title>
  <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
</head>

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

Thank you Steven, whoswho and Adam. After I applied these measures you suggested, I was able to complete the assignment and move on to the next section.