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 Floating Columns and Images

Alireza Noori
Alireza Noori
8,351 Points

What happens when we use float:initial?, could we use float:none instead?.

I noticed Gill is using float:initial in the media query!. I kind of understand that initial means 'use the browser default' (hope I'm correct). But Why Gill uses float:initial here in the media queries?. Couldn't he just use float:none?.

1 Answer

Jason Desiderio
Jason Desiderio
21,811 Points

Yes, in this case, float: none; is the initial value as declared in the CSS specifications so they are interchangeable. Though in CSS3, initial allows authors to explicitly specify this initial value. Here is a great website to check all initial values of css properties:

http://devdocs.io/css/float

Alireza Noori
Alireza Noori
8,351 Points

AWESOME!, thanks for the help Jason :)