While it may be more convenient to use flexbox over older concepts like
display: inline;
float: right
When comparing simply adding a container and using display: flex;
versus changing each element inside the container to display: inline;
, what are the benefits of using flexbox? Aside from features such as direction, wrap, justify-content, etc.
For example, can I achieve the same properties (one item placed horizontally after another within the container, both fitting the total container size) by using display:inline
and float: right
?
I understand that this method is inefficient. However, I am looking for reasons why flexbox is a superior alternative to the traditional inline/float approach, even when only utilizing its key features.