Bars
Navigation items have been meticulously designed to be very straightforward, semantic, and dependent on sensible defaults.
Navigation bars consist of three elements:
- The container (Your choice of element)
- The menu (
nav
) - The menu items (
ul li
structure)
Why not just have <nav>
without the extra div above? This is to give you
more separation between the flexbox elements and the container it sits in.
Flexbox display settings will affect the direct descendants. The need for
this separation becomes clearer as the navbar becomes more complex, such
as the addition of a wrapper inside the container.