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

CSS CSS Layout Techniques Float Layout The Float Clearfix

David Service
David Service
12,928 Points

At the 4:00 mark, why does Gill use the "float: initial;" declaration instead of "float: none;" for the media query?

Would both of these declarations give us the same result, or does Gill have a specific reason for using "float: initial;"?

2 Answers

Rostislav Kavan
Rostislav Kavan
6,818 Points

Ok, first, Guil does not explain in the video why is he using initial values.

However from what i gather, they would both give the same result and it actually seems that Initial values is less supported than None value.

I think the recommended practice is float: none;

http://stackoverflow.com/questions/19076141/ie-thinks-that-float-initial-is-float-left

David Service
David Service
12,928 Points

Hi Rostislav,

I was thinking along the same lines, but couldn't find any confirmation that "float: none;" would be the best choice.

Thanks for the linked article; gave me just the answer I was looking for.

David

Debra Bush
Debra Bush
7,367 Points

Float: initial; wasn't performing the way the video showed so I changed it to float: none; and it performed the same way the video shows with the logo and navigation.

So if you're watching this now use float: none; as it seems to have less issues as explained above.