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!

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


Why is the floated width value 46.5% of the it's parents element?

On minute 2:35, Guill positioned the tips and resort element at a width of 46.5%. Why did he not use 50% as its two columns?

1 Answer

Patrik Horváth
Patrik Horváth
11,110 Points

because margin and padding on other HTML element

he should fix it with something like this and then he can use 50%

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
    text-decoration: none;
    list-style: none;