The w3-mobile class defines responsive elements.
On medium and large screens (tablets and desktops), the bar items will appear side by side horizontally. On smalls screens (smartphones), the items are vertically and centered:
Resize the browser window to see the effect.
Default navigation bar:
Responsive navigation bar: