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
Graham Davidson
Courses Plus Student 14,966 PointsPercentage widths with display:table
Ok so this is as strange as a badger riding a motorbike. Why on this codepen http://codepen.io/justg/pen/qocsG when I have the width of the first col set to 40% is it clearly larger than 40%.
Cannot get my head around it.
2 Answers
Janek Rezner
12,973 Pointsyou have .col-one and the aside nested inside .table-row <section> styled {display:table-row}. so both elements (.col-one and aside) need to have correct percent values (in other words they need to evaluate to 100%).
i.e.
if you style first col to 40% then your aside need to be set to 60% in order for the values to display correctly.
Graham Davidson
Courses Plus Student 14,966 PointsWhere is the Yann is a genius button - I don't see it.
Thank you ever so much