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

Kailash Seshadri
Kailash Seshadri
3,087 Points

FLOATS

I can't seem to wrap my had around the float property in CSS. Could someone please help explain it to me in simple words? Thanks!!

i didn't understand your problem ?

Kailash Seshadri
Kailash Seshadri
3,087 Points

Hi ashish i don't quite understand the float property. Could u please explain it to me?

float property mostly used for arranging div positions left or right . Can you please tell me what making you confused in floats.

1 Answer

Tomasz Sporys
Tomasz Sporys
11,258 Points

Float property makes an html element behaving as if was floating above the whole document. You can imagine that the whole html document is like a layer of something. When you make the element to float it's like putting it above that layer so that the element that are on that document layer don't know about its existence and snap together ignoring the floating element. I don't know if it's a good explanation, but I', trying at least heheh.

Kailash Seshadri
Kailash Seshadri
3,087 Points

Thanks it was good enough... Ill give you the best andwer though! :)