How to disable stacking of bootstrap justified tabs on small screens

后端 未结 9 2193
我寻月下人不归
我寻月下人不归 2020-12-24 06:51

I have seen this post, but being a new user I can\'t comment to ask for clarification.

I\'m using the justified nav tabs in Bootstrap and don\'t want them to stack o

9条回答
  •  难免孤独
    2020-12-24 07:57

    I've attempted to edit @pjb answer as it's incomplete. But my edit was rejected, twice, as apparently it's 'incorrect'. Although plunker would tend to disagree...

    This is the original that shows that the active tabs bottom border is showing when condensed

    http://plnkr.co/edit/p62KlHnqPjAsK7XR3mLa?p=preview

    And this version, where it's clearly not showing

    http://plnkr.co/edit/BBDW7nIxGh0J6a9vsuZx?p=preview

    @media (max-width: 768px) {
      .nav-justified > li {
        display: table-cell;
        width: 1%;
      }
      .nav-justified > li > a  {
        border-bottom: 1px solid #ffffd !important;
        border-radius: 4px 4px 0 0 !important;
        margin-bottom: 0 !important;
      }
      .nav-tabs.nav-justified > .active > a,
      .nav-tabs.nav-justified > .active > a:hover,
      .nav-tabs.nav-justified > .active > a:focus {
        border-bottom-color: #fff !important;
      }
    }
    

提交回复
热议问题