The navbar is fully contained by an HTML5 Nav tag. Inside a recommended container div, there are 2 main parts of the navbar. A logo or brand link, and the navigations links. You can align these links to the left or right.

Right Aligned Links

To right align your navbar links, just add a right class to your <ul> that contains them.

Centering the logo

The logo will center itself on medium and down screens, but if you want the logo to always be centered, add the center class to your <a class="brand-logo">. You will have to make sure yourself that links do not overlap if you use this.

Extended Navbar with Tabs

To add extended components to the navbar, add the class nav-extended to the outer nav tag. This will allow your navbar height to be variable. Then you can just include a tabs component inside the nav-wrapper.

Fixed Navbar

To make the navbar fixed, you have to add an outer wrapping div with the class navbar-fixed. This will offset your other content while making your nav fixed. You can adjust the height of this outer div to change how much offset is on your content.

Navbar Dropdown Menu

To add a navbar dropdown menu, add the ul dropdown structure into the page.
Then, add an element to trigger the dropdown menu. Make sure to supply the id of the dropdown structure to the
data-activates attribute of the dropdown trigger.

Mobile Collapse Button

When your nav bar is resized, you will see that the links on the right turn into a hamburger icon menu. Take a look at the example below to get this functionality. Add the entire button-collapse line to your nav.

Initialization

After including the button-collapse line into your navbar, all you have to do now is place this code in your page's $( document ).ready(function(){}) code. This example below assumes you have not modified the classes in the above example. In the case that you have, just change the jQuery selector in the line below to match it.

Help Materialize Grow

We hope you have enjoyed using Materialize and if you feel like it has helped you out and want to support the team you can help us by donating or backing us on Patreon. Any amount would help support and continue development on this project and is greatly appreciated.