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
Warren Fairbairn
2,516 PointsAdded the container div to smells like bakin' but it doesn't work.
I just can't see where I have gone wrong any help would be appreciated.
<!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/class" media="screen">
</head>
<body>
<div class="container clearfix">
<img src="img/logo.gif" alt="Smells Like Bakin">
<ul class="nav">
<li><a href="#">About</a></li>
<li><a href="#">Cupcakes & Prices</a></li>
<li><a href="#">Locations</a></li>
<li class="last"><a href="#">Contact Us</a></li>
</ul>
<div id="intro">
<hl>Opposites really do attract, especially in our kitchen! We combine unexpected flavors that melt together to create ironically delicious desserts.</hl>
<p><a href="#" class"btn">Browse Our Cupcakes</a></p>
</div>
<img src="img/you-bake-me-blush.gif" alt="You Bake Me Blush">
<div id="featured-cupcake">
<h2>Cupcake of the Week</h2>
<p>This week's featured cupcake is the <a href="#">Avacado Chocolate cupcake</a>. Its strange combo of flavors will kick your taste buds into fiesta mode!</p>
<img src="img/featured-cupcake.jpg" alt="Avocado Chocolate Cupcake"
</div>
<div>
<h2>Fresh Out the Oven</h2>
<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno So Spicy</a>.</p>
<img src="img/new-cupcake-bacon.jpg" alt="Bacon Me Crazy">
<img src="img/new-cupcake-jalapeno.jpg" alt="Jalapeno So Spicy">
</div>
<h2>Inside the Kitchen</h2>
<p>Smells Like Bakin' started out in the garage of the husband wife duo Allison & Joseph. Allison is the baker, and Joseph found a way for them to make a business out of her tasty treats. Flash forward to today and they hve a successful store front, catering business and cupcake truck.</p>
<p><a href="#" class"btn-small">Read More</a></p>
<h2>Get Bakin' with Us</h2>
<div id="contact">
<p>Call us: <span>1-555-CUP-CAKE</span><br>
Email us: <a href="#">bakeon@smellslikebakin.com</a></p>
</div>
<p>We announce all of our new flavors first through Facebook & Twitter, and even take requests!</p>
<a href=http://www.faebook.com/SmellsLikeBakin"><img src="img/facebook.gif" alt=Facebook"></a>
<a href=http://www.twitter.com/#!/smellslikebakin"><img src="img/twitter.gif" alt="Twitter"><a/>
<div id="copyright">
<p>© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserves.</p>
</div>
</div>
</body>
</html>
20 Answers
Robert O'Connor
7,956 PointsWhat is it doing/not doing? Just glancing at the code I see some typos,
<p><a href="#" class"btn">Browse Our Cupcakes</a></p> ---------------- is missing = between class and " <p><a href="#" class"btn-small">Read More</a></p> ----------------------- also missing =
Warren Fairbairn
2,516 Pointsit is supposed to center the page and give it equal borders on all sides but it isn't doing that
Robert O'Connor
7,956 Pointscheck your code in grid.css container should have width of 1000px and margin should be set to auto.
Warren Fairbairn
2,516 Pointsyeah that is what is written, also this part of the code, in sublimetext 2 is all in yellow which I think means something isn't right but I can't see what it is.
<div id="copyright">
<p>© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserved.</p>
</div>
</div>
</body>
</html>
Robert O'Connor
7,956 Pointsthat code looks fine, double check the fine details I sometimes pull my hair out trying to fix something that was just a missing ; or '. Post your grid.css
Robert O'Connor
7,956 Pointsmissing closing bracket in Avocado Cupcake img tag
Warren Fairbairn
2,516 Pointshere it is
/*
Width: 1000px
# Columns : 12
Column width: 65px
Gutter : 20px
*/
.grid_1 { width: 65px; }
.grid_2 { width: 150px; }
.grid_3 { width: 235px; }
.grid_4 { width: 320px; }
.grid_5 { width: 405px; }
.grid_6 { width: 490px; }
.grid_7 { width: 575px; }
.grid_8 { width: 660px; }
.grid_9 { width: 745px; }
.grid_10 { width: 830px; }
.grid_11 { width: 915px; }
.grid_12 { width: 1000px; }
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
margin: 0 20px 10px 0;
float: left;
display: block;
}
.alpha{margin-left:0px;}
.omega{margin-right:0px;}
.container{
width: 1000px;
margin: auto;
}
.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}* html .clearfix,*:first-child+html .clearfix{zoom:1}
I appreciate you taking the time to help, I'm so lost atm lol.
Robert O'Connor
7,956 Pointsalso issue with copyright section is from right before it, you have <a/> not </a> closing the twitter link
Robert O'Connor
7,956 Pointsalso missing a bunch of " in the facebook and twitter lines
Warren Fairbairn
2,516 Points <p>We announce all of our new flavors first through Facebook & Twitter, and even take requests!</p>
<a href="http://www.faebook.com/SmellsLikeBakin">"img src="img/facebook.gif" alt=Facebook"></a>
<a href="http://www.twitter.com/#!/smellslikebakin">"img src="img/twitter.gif" alt="Twitter"><a/>
<div id="copyright">
<p>© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserved.</p>
</div>
</div>
</body>
</html>
ok edited that, and the code looks fine now (all the right colours) but the webpage is still not displaying how it is supposed to... hmmm
Robert O'Connor
7,956 Pointsthat code still has typo's :
- next to img tag you have " instead of <
- alt=Facebook" is missing open "
fix those and then repost your index.html and style.css files and ill load them up on my pc. and try and find the issue
Warren Fairbairn
2,516 Points<!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/class" media="screen">
</head>
<body>
<div class="container">
<img src="img/logo.gif" alt="Smells Like Bakin">
<ul class="nav">
<li><a href="#">About</a></li>
<li><a href="#">Cupcakes & Prices</a></li>
<li><a href="#">Locations</a></li>
<li class="last"><a href="#">Contact Us</a></li>
</ul>
<div id="intro">
<hl>Opposites really do attract, especially in our kitchen! We combine unexpected flavors that melt together to create ironically delicious desserts.</hl>
<p><a href="#" class="btn">Browse Our Cupcakes</a></p>
</div>
<img src="img/you-bake-me-blush.gif" alt="You Bake Me Blush">
<div id="featured-cupcake">
<h2>Cupcake of the Week</h2>
<p>This week's featured cupcake is the <a href="#">Avacado Chocolate cupcake</a>. Its strange combo of flavors will kick your taste buds into fiesta mode!</p>
<img src="img/featured-cupcake.jpg" alt="Avocado Chocolate Cupcake">
</div>
<div>
<h2>Fresh Out the Oven</h2>
<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno So Spicy</a>.</p>
<img src="img/new-cupcake-bacon.jpg" alt="Bacon Me Crazy">
<img src="img/new-cupcake-jalapeno.jpg" alt="Jalapeno So Spicy">
</div>
<h2>Inside the Kitchen</h2>
<p>Smells Like Bakin' started out in the garage of the husband wife duo Allison & Joseph. Allison is the baker, and Joseph found a way for them to make a business out of her tasty treats. Flash forward to today and they hve a successful store front, catering business and cupcake truck.</p>
<p><a href="#" class="btn-small">Read More</a></p>
<h2>Get Bakin' with Us</h2>
<div id="contact">
<p>Call us: <span>1-555-CUP-CAKE</span><br>
Email us: <a href="#">bakeon@smellslikebakin.com</a></p>
</div>
<p>We announce all of our new flavors first through Facebook & Twitter, and even take requests!</p>
<a href="http://www.faebook.com/SmellsLikeBakin"><img src="img/facebook.gif" alt="Facebook"></a>
<a href="http://www.twitter.com/#!/smellslikebakin"><img src="img/twitter.gif" alt="Twitter"><a/>
<div id="copyright">
<p>© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserved.</p>
</div>
</div>
</body>
</html>
/*
Width: 1000px
# Columns : 12
Column width: 65px
Gutter : 20px
*/
.grid_1 { width: 65px; }
.grid_2 { width: 150px; }
.grid_3 { width: 235px; }
.grid_4 { width: 320px; }
.grid_5 { width: 405px; }
.grid_6 { width: 490px; }
.grid_7 { width: 575px; }
.grid_8 { width: 660px; }
.grid_9 { width: 745px; }
.grid_10 { width: 830px; }
.grid_11 { width: 915px; }
.grid_12 { width: 1000px; }
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
margin: 0 20px 10px 0;
float: left;
display: block;
}
.alpha{margin-left:0px;}
.omega{margin-right:0px;}
.container{
width: 1000px;
margin: auto;
}
.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}* html .clearfix,*:first-child+html .clearfix{zoom:1}
there ya go, should be no typos left. You are a diamond for helping thanks dude!
James Barnett
39,199 Points> should be no typos left.
Looks like you missed 2.
- Line 19: It's
<h1>the number not<hl>the letter - Line 53: Closing tag is invalid, the slash is in the wrong place
Robert O'Connor
7,956 Pointshow about style.css too
James Barnett
39,199 PointsYou've got a lot of invalid markup there, probably due to typos.
I noticed 3 types of issues:
- Elements missing their closing tags
- Attributes missing their
=sign - Attributes missing their closing quotes
"
Run your code through http://validator.w3.org/nu/ once you fix all of the issues you should be good to go.
William Whitworth
6,117 PointsSometimes it helps to run the code through a validator like: http://validator.w3.org/#validate_by_input it will output on all the errors, there are still more the on line 53 your a/ is wrong, use /a
Edit: Yeah, what James said. :D
Robert O'Connor
7,956 Pointsthe error is in your grid.css link you have type="text/class" instead of "text/css"
William Whitworth
6,117 PointsGood catch! Haha, typos suck... especially when the validator doesn't pick them up.
Warren Fairbairn
2,516 Pointsok I ran it through the validator and fixed the errors, but still not getting the desired result. What else could it be? I'm going nuts here heh :D
Robert O'Connor
7,956 Pointsworks fine on my pc once class was replaced with css
Warren Fairbairn
2,516 PointsYOU BEAUTY!!!! Thanks so much Rob and everyone else. It is working now. Still a long way to go before I master this web design malarky.
Thanks again everyone for the help. :D
Robert O'Connor
7,956 PointsNo problem. I am terrible at typing so one thing I do to help prevent typos is constantly saving file and refreshing the browser, this helps narrowing down the error.