Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


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,085 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;