O'Reilly logo

Bootstrap for Rails by Syed Fazle Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Navigation bar helper classes

There are many helper classes available for navigation bar elements. Some of them are as follows:

  • .navbar-btn: When you want to place a Bootstrap button in a navigation bar, use this class to properly align it
  • .navbar-text: If you want to display some plain text, use this class to make it properly visible
  • .navbar-link: If you want to add a link, but not inside the .nav element, then use this class
  • .navbar-fixed-top: If you add this class to the parent of the navigation bar navbar, it will stick to the top of the browser window while scrolling
  • .navbar-fixed-bottom: This class fixes the navigation bar to the bottom of the window screen and it remains there while scrolling
  • .active: Adding this class to any of the <li> elements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required