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 trialMike Sharp
2,280 PointsMy <div id="wrapper"> does not center as displayed in the video
https://teamtreehouse.com/workspaces/28466512#
would a more experienced set of eyes please advise?
1 Answer
Austin Whipple
29,725 PointsMike,
As Kevin mentioned, a functional link to your workspace would be very helpful in helping us determine the issue. Without seeing the code, I recommend checking that your #wrapper
div has the appropriate width
and margin
declarations. Something along the lines of this should do the trick:
#wrapper {
/* Setting a width prevents the block-level element default of stretching to 100% of the width of its parent element. */
max-width: 860px;
/* The zero here removes any margin above and below the element while auto fills the space to the left and right equally to effectively center the wrapper element. */
margin: 0 auto;
}
kevin anderson
Front End Web Development Techdegree Graduate 41,112 Pointskevin anderson
Front End Web Development Techdegree Graduate 41,112 Pointsthe link to workspace does not work