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
wolnie stewart jr
606 Pointswrapper problem wont center
'''css a { text-decoration: none; }
wrapper {
max-width:940px; margin: 0 auto; }
8 Answers
eck
43,038 PointsIf that is exactly the code you are using the problem lies in the selector. Is wrapper the name of a class or id? If it is a class you need to write ".wrapper", if it is an id you need "#wrapper"
assuming it is an id, try this:
#wrapper {
display: block;
max-width: 940px;
margin: auto;
}
I also set the display property, just in case your wrapper element does not have display block by default.
wolnie stewart jr
606 Pointsit is an id and i followed your steps still nothing. i even went back and started from scratch and got nothing
Jason Anello
Courses Plus Student 94,610 PointsHi Wolnie,
Have you checked whether you've linked your css file properly?
And the html is correct? Should be <div id="wrapper">
wolnie stewart jr
606 PointsHi jason, im doing the tutorial we haven't covered div yet. i'm linking the css file with my html file but it seems like the wrapper isn't working i followed all the steps but it doesn't look like what is displayed in front of me
Jason Anello
Courses Plus Student 94,610 PointsAre you on the "How to make a website" project?
What html do you have that this css is targetting?
Here's some tips on posting code in the forums: https://teamtreehouse.com/forum/posting-code-to-the-forum
wolnie stewart jr
606 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Wolnie Stewart | Designer </title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html">
<h1> Wolnie Stewart </h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
</header>
<section>
<ul>
<li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>Playing with blending modes in photoshop.</p>
</a>
</li>
<li>
<a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>Trying to create an 80's style of glow.</p>
</a>
</li>
<li>
<a href="img/numbers-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>Drips using photoshop brushes.</p>
</a>
</li>
<li>
<a href="img/numbers-012.jpg">
<img src="img/numbers-012.jpg" alt="">
<p>Creating shapes using repetition.</p>
</a>
</li>
</ul>
</section>
<footer>
<img src="img/twitter-wrap.png" alt="twitter logo">
<a href="http://facebook.com/chillywill"><img src="img/facebook-wrap.png" alt="Facebook logo"></a>
<p>© 2014 Wolnie Stewart.</p>
</footer>
</body>
</html>
Jason Anello
Courses Plus Student 94,610 PointsYour <section> and <footer> elements should be wrapped by a div with id "wrapper"
<div id="wrapper">
<section>
<!-- Gallery markup here -->
</section>
<footer>
<a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a>
<a href="http://facebook.com/nickpettit"><img src="img/facebook-wrap.png" alt="Facebook Logo"></a>
<p>© 2014 Nick Pettit.</p>
</footer>
</div>
I'm not sure what lesson that was in but you must have missed putting that in.
wolnie stewart jr
606 Pointsthanks bro you were a big help but for some reason i had to
<div>
<div id="wrapper">
if i just put
<div id="wrapper">
it would not work
Jason Anello
Courses Plus Student 94,610 PointsYou need to have both an opening tag <div id="wrapper"> and a closing tag </div>
The opening tag goes right before <section> and the closing tag goes right after the closing </footer> tag
wolnie stewart jr
606 Pointsthank you jason for your help it worked =)
Jason Anello
Courses Plus Student 94,610 PointsYou're welcome.