Jump to content

Float and Clear both (why not to use them )?

Recommended Posts

hi guys im starting to re- learn html and css

and i came across options that are called Float(left right ..) and Clear both .

i remember when i first learned about html and css i used that non stop

but a friend of mine told me i should stop using that bcs there are other ways of adjusting something on the page without float or clear option.

he said to use Flex box (not sure what that is but il check it out soon )




My question is why is it bad to use Float and Clear .Is it going to ruin the page in some way? Or does Flex box do what float and clear can and much more ?

Link to post
Share on other sites

Flex box works better, but browser support is still lacking. Using float and clear is just fine as long as you are aware that containers don't wrap around floated elements by default.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...