From the course: Bootstrap 4 Migration

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Upgrading navs

Upgrading navs

- [Instructor] Navs were pretty simple in Bootstrap Three, and they're a good example of a component that has gotten a bit of an upgrade because of Flexbox. A lot has stayed the same, but there is a bit more markup, and it's easier to lay them out now. If you looked at the examples in the Bootstrap Three documentation, you're probably used to using navs with unordered lists. In this new version of Bootstrap, you can use navs with or without ULs. So you can use navs as well as just regular links for the actual navigation elements. Just like before, the main class is called Nav. Now because it works with and without lists, you have to add a nav-item to each item. If you're using lists, this goes in the LI, and if you're using anchor tags, this would go in the anchor tags. If you're using anchor tags without list items, you can use both the nav-item and the nav-link classes in the anchor tags. Otherwise, nav-link goes just in the anchor tag. Because the nav is now Flexbox based, you can…

Contents