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 trialLuca Edexia
9,718 PointsSet the wrapper's width to 80% of the browser width. Then use margins to center the wrapper in the browser.
How Can I resolve this task?
Thanks in advance.
1 Answer
Michael Afanasiev
Courses Plus Student 15,596 PointsHello Luca,
Well since I don't know what are you coding, I can't point out your mistakes, but here is the CSS to pass this challenge:
.container {
width: 80%;
margin-left: auto;
margin-right: auto;
}
PLEASE REVIEW YOUR CODE AND DON'T JUST COPY/PASTE, THANK YOU :)
Jesus Mendoza
23,289 PointsJesus Mendoza
23,289 Pointsyou can also use margin: auto or margin: 0 auto; to shorten your code
Jesus Mendoza
23,289 PointsJesus Mendoza
23,289 Pointsyou can also use margin: auto or margin: 0 auto; to shorten your code
Michael Afanasiev
Courses Plus Student 15,596 PointsMichael Afanasiev
Courses Plus Student 15,596 PointsYes Jesus, I thought of it as well after :P Thank you!