Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Bootstrap 3.3.X nav-pills matrix"
Bootstrap 3.3.0 Snippet by
olivierlabbe
3.3.0
pills
Preview
HTML
CSS
View Full Screen
Fork
Fork this
4.0K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <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; }
Related:
See More
Template
Vue Black Dashboard Pro
44.9K
32
Vertical Sidebar with Pointy Nav Pills
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76