css - How can I get Twitter-Bootstrap 3's navbar to work in mobile and desktop view justified? -
so wanted bootstrap 3 navbars links justified/centered. asked community why when applying .nav-justified
conflicted .navbar-nav
. 2 should not applied each other because
the .nav-justifed class used nav-tabs / nav-pills (see bootstrap docs) , not nav-bar. 2 concepts different , should not confused.
however, can achieve effect looking adding following css:
.navbar-nav.nav-justified > li{ float:none; } nav-justifiednow plays nice navbar-nav:
what suggested worked perfectly, when use responsive navbar, collapse on mobile view, links stay horizontally aligned in mobile view, instead of them being listed vertically.
i have prepared fiddle in case little confused.
the first navbar not have .nav-justified
applied it, works fine when using mobile view. links not centered, they're pulled left.
the second navbar have .nav-justified
links centered, when using mobile view links still centered, , not listed vertically first navbar.
do have suggestions on how fix this?
Comments
Post a Comment