This gist uses most of the same methods as the Flex Nav Bar. However uses a header
as the main bar and uses inline-block
styling on the list elements
- This is a semantic way to create a complex header bar
- This can be especially useful if you have more than just your navlinks in the top bar
- Ie: a contact or shopping cart button for modal popups, an email button that opens up the user's default email client...
- This can be an excellent practice for your site structure
- Instead of styling the ul extensively, you can cut down your code by using
inline-block
on theli
elements - This remove the need to change the
list-style-type
- You will still need display flex and flex wrap if you want the links to not stay static
- If you want the links to wrap from the right first, you also need to set
justify-content: flex-end
- If you want the links to wrap from the right first, you also need to set
- gap is used in this example, it creates space between flex items
- Jessica Gust For the idea to use
inline-block
on the nav list items.