CSS CSS Flexbox Layout Building a Layout with Flexbox Building a Navigation Bar with Flexbox

Ruben Peters
Ruben Peters
3,452 Points

If we use Flexbox CSS properties, do we still need to use floats and inline or block properties?

In the workspace I saw both CSS properties being used.

2 Answers

Steven Parker
Steven Parker
171,904 Points

Depending on what you need to accomplish, you may use more than one tool in the same project but not necessarily on the same element. Clearly, any one element cannot have a display set to both "block" and "flex" at the same time. But you could use them on different elements.

On the other hand, since flexbox can do most anything you might use "float" for, but it gives you more control, once you're comfortable with flexbox you might tend to use it exclusively for those kind of layout needs.

Ruben Peters
Ruben Peters
3,452 Points

Thank you, yes I am much more comfortable with Flexbox, I tend to get really confused about which classes and ids should receive what properties, I think I lack confidence as I don't really have had much real life practice in web developing.

Steven Parker
Steven Parker
171,904 Points

As you may suspect, you will acquire confidence along with experience. Just keep at it.

If you are already comfortable with flexbox, you're well on your way!

Happy coding!