Adjusting nav item padding

Now, let's adjust our nav items so that the text of our links shares the same baseline as our logo.

In _navbar.less, find the selector .navbar-nav. It is the parent ul of our navbar items. Within this set of rules, you'll find nested media queries. (See the documentation on nested media queries at http://lesscss.org.) The relevant lines are given as follows:

// Uncollapse the nav
  @media (min-width: @grid-float-breakpoint) {
    float: left;
    margin: 0;
    > li {
      float: left;
      > a {
        padding-top: ((@navbar-height - @line-height-computed) / 2);
        padding-bottom: ((@navbar-height - @line-height-computed) / 2);
      }
    }
  }

The variable @grid-float-breakpoint specifies the point at which the navbar expands to its full width or collapses to create ...

Get Bootstrap Site Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.