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

What is wrong with this coding (coding challenge)?!

The challenge is: Add a 'div' around the 'featured-cupcake' element and give it the classes 'container' and 'clear fix'. However it t keeps saying"Bummer! Make sure you wrap the 'featured-cupcake' element in a new div." This is what i got: <!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 id="featured-cupcake"> <div class:"container clearfix"> <h2>Cupcake of the Week</h2> <img src="img/featured-cupcake.jpg"> </div> </body> </html>

7 Answers

It did not print the code I put in. You need to open the div class container clearfix just below the opening body tag and the close it just above the closing body tag. I believe that will solve the problem

> It did not print the code I put in.

The forum uses markdown to correctly format code, check out this thread on how to type code in the forum for some examples.

I believe you need to put <div class="clear container"> Just under the <body> tag. Then You need to close the div </div> just above the closing </body> tag at the bottom of the page.

Hey richard thanks for answering.

What do you mean "put just"? and what do you mean the closing tag?

Sorry its my second day coding!

Hey richard thanks for answering.

What do you mean "put just"? and what do you mean the closing tag?

Sorry its my second day coding!

Thanks so much got it!

Can i ask one more question… i still don't really understand what container and and clear fix really mean?

James

I am just learing as well. I believe it has to do with how web browsers read code (CSS), so there is uniformity. Pages will look the same in: Chrome, Firefox, IE, Safari etc.

Ahh brilliant thank you!

And i know its not your job and all… but i am finding it difficult to conceptualise grids as when i try it out on this little site i'm making (separate to the baking one) the different grid numbers just throw things everywhere! Do you have any idea how its structured??

Thanks again!