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
sandygomez
2,498 Pointsborder-box: box-sizing
I have my whole page set to border-box: box-sizing. My page is fluid based on percentages. 2 column layout floated Left with main-content set to 66.66% and side bar to 33.33%. Why is it when I add padding to make columns have readable space between them does the sidebar content get pushed to the wrap to bottom. I have box-sizing set, so why is this occuring? http://codepen.io/sandyngomez/pen/rVRZqE/?editors=110
4 Answers
Christian Higgins
15,758 PointsIt's the opposite. It's box-sizing: border box;
Your body is set to border-box but what about the two columns? I believe the columns must both have a border-box as well. They do not inherit the box sizing attribute from the parent element.
Jonathan Pyper
354 PointsHey sandy, you still need to add prefixes as far as i am aware:
*{ -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; }
sandygomez
2,498 PointsThanks so much I changed to correct code and it did the trick;
Jonathan Pyper
354 PointsAlso Sandy you nav is wrong:
<li><a href="">Home</li></a>
should be:
<li><a href="">Home</a></li>