1

Assuming I have a bootstrap 3 navbar with a navbar-brand containing text, how can I add a small subtitle that fits right underneath that navbar-brand?

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
Rolando
  • 58,640
  • 98
  • 266
  • 407

2 Answers2

5

@cab's solution works, but here's another option that will not impact the height of the default navbar (due to increased padding):

.navbar-brand {
  line-height:12px;
  padding-top:20px;
  padding-bottom:5px;
}

.navbar-brand small {
  display:block;
  font-size:10px;
}

http://bootply.com/106312

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
  • 1
    Keep _.navbar-brand_ with default configs and apply _.navbar-brand small_ style worked to me. – Nowdeen Aug 07 '16 at 13:34
3

This is one way of doing it:

DEMO: http://jsbin.com/AFiNehIz/1/edit


HTML

 <a class="navbar-brand" href="#">Project name<small>Tagline goes here</small></a>

CSS

.navbar-brand small {
  display:block;
  font-size:12px;
}

.navbar-toggle {top:10px}

@media (min-width:768px) {
  
  .navbar-brand {
    padding-top:20px;
  }
  
  .nav.navbar-nav a {
    padding-top:30px;
    padding-bottom:30px;
  }

}
Community
  • 1
  • 1
Christina
  • 34,296
  • 17
  • 83
  • 119