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 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.