"Bootstrap 3.3.X nav-pills matrix"
Bootstrap 3.3.0 Snippet by olivierlabbe

<div class="container"> <div class="row"> <div class="col-xs-6"> <ul class="nav nav-pills nav-matrix"> <li role="presentation"><a href="#">Home</a></li> <li role="presentation"><a href="#">Profile</a></li> <li role="presentation"><a href="#">Messages</a></li> <li role="presentation"><a href="#">pills 4</a></li> <li role="presentation"><a href="#">pills 5</a></li> <li role="presentation"><a href="#">oversize text in the pills</a></li> <li role="presentation"><a href="#">pills 7</a></li> <li role="presentation"><a href="#">pills 8</a></li> <li role="presentation"><a href="#">pills 9</a></li> </ul> </div> </div> </div>
.nav.nav-matrix { display: flex; flex-wrap: wrap; align-content: stretch; } .nav.nav-matrix li { width: 24%; // 24% for 4 cols -- 33% for 3 and 49% for 2 display: flex !important; align-content: center; } .nav.nav-matrix li a { display:flex !important; align-items:center; flex-grow:1; }

Questions / Comments:

Related: See More