Jump to content

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


Herofeeder

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 comment
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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...