What Is the Difference between float, flex, and inline-block

Forums CSSWhat Is the Difference between float, flex, and inline-block
Staff asked 3 years ago

What Is the Difference between float, flex, and inline-block

Answers (1)

Add Answer
Ankit Bavishi Marked As Accepted
Staff answered 3 years ago

All are used for set blocks one by one like column vise.
float, after float use, need to clear float.
Flex
is the latest of comparing to float and flex provide lots of option like the center alignment of horizontal/vertical.
inline-block, We can also use inline-block for columns but it’s left blank space between columns.

I prefer to use flex.

Subscribe

Select Categories