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
troy beckett
12,035 Pointsusing float in css..
ok so I'm learning how to make a website and I'm starting to understand it more and more. I find the html pretty self explanatory but the css a little harder. If possible could someone explain using in float in css. I don't really understand what it does and when and how to use it properly
3 Answers
Chris Shaw
26,676 PointsHi Troy,
While I would love to explain the float property the great Chris Coyer has already done this. http://css-tricks.com/almanac/properties/f/float/
Jonathan Grieve
Treehouse Moderator 91,254 PointsFloats take HTML elements outside of "normal flow" which is stacking on top of each other on screen. If you apply a float to an element, that element will stack left to right across the screen. It will no longer sit contained inside a div if it a child of that div.
Go ahead and experiment with this in your CSS and hopefully that will show you what I mean. :)
Mathieu Delporte
8,097 PointsThis link has some pretty in-depth info about floats: http://css.maxdesign.com.au/floatutorial/index.htm.