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 trialPatsy Tisdale
5,049 PointsThe Box Model
The third challenge is:
Currently, the width of the div with the class main is set to 400px, but the padding applied is adding an extra 40 pixels to its total width. Add a property that forces the padding into the width of the div.
My solution was this:
box-sizing: border-box;
This was the solution provided in the lesson, but it was marked wrong. Can someone tell me why?
4 Answers
David Tonge
Courses Plus Student 45,640 PointsIs it possible for you to tell us exactly which challenge it is?
Dillon Patel
4,025 PointsI just completed that and that's the answer I used. Make sure the whole rule is correct.
.main {
box-sizing: border-box;
}
Patsy Tisdale
5,049 PointsI may have left off the .main. I will check. Thanks!
Patsy Tisdale
5,049 PointsIt worked. Thanks again.
Patsy Tisdale
5,049 PointsPatsy Tisdale
5,049 PointsIt was the challenge on width, height, and overflow properties, but I have it right now. Thanks.