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 trialKenandrae Wheatt
3,944 Pointsbody wrapper doesn't work in chrome
when I use width and margin to create a wrapper for the body tag. The styling isn't reflected in chrome but it does work in Firefox.
Kenandrae Wheatt
3,944 Pointsbody {
line-height: 1.6;
color: #3a3a3a;
width: 70%;
margin: 0 auto;
}
a {
color: #fff;
text-decoration: none;
}
/* =================================
Base Layout Styles
==================================== */
/* ---- Layout Containers ---- */
.wrapper{
width: 70%;
margin: 0 auto;
}
.main-header {
background: #3acec2;
}
.main-footer {
padding: 2em 0;
background: #d9e4ea;
}
/* ---- Page Elements ---- */
3 Answers
Jacob Mishkin
23,118 PointsI see two things that might be an issue,
- your body and wrapper div are the same width.
- You applied a color property to the body not a background color.
There is a possibility that this is the issue.
Diamond Black
5,942 PointsSame thing happening to me now. When I put the width and margin setting with the body it works fine. If i use this code, the class wrapper does not center my content. Any reason why? Using chrome btw
/* =================================
Base Element Styles
==================================== */
body {
line-height: 1.6;
color: #3a3a3a;
}
a {
color: #fff;
text-decoration: none;
}
/* =================================
Base Layout Styles
==================================== */
/* ---- Layout Containers ---- */
.wrapper {
width: 70%;
margin: 0 auto;
}
.main-header {
background: #3acec2;
}
.main-footer {
padding: 2em 0;
background: #d9e4ea;
}
/* ---- Page Elements ---- */
Ashvin Mbuguni
6,360 Pointsmine doesnt work either on chrome;
/* ================================= Base Element Styles ==================================== */
body { line-height: 1.6; color: #3a3a3a; }
a { color: #fff; text-decoration: none; }
/* ================================= Base Layout Styles ==================================== */
/* ---- Layout Containers ---- */
.wrapper { width: 70%: margin: 0 auto; }
.main-header { background: #3acec2; }
.main-footer { padding: 2em 0; background: #d9e4ea; }
/* ---- Page Elements ---- */
Brian Pritt
3,741 PointsYou have a colon rather than a semi-colon after the width value in .wrapper .
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 Pointscan you please post your code for the wrapper so we can see what the issue is.