Search code examples
twitter-bootstraptabsnavjustify

How to disable bootstrap nav-justified collapse for smaller devices


I am using bootstrap to justify a bunch of tabs to evenly fit the width of the parent element. This is important to me. However Bootstrap automatically collapses these for smaller devices, giving them 100% width, which I don't want.

How can I disable this function?

Simple Code:

<ul class="nav nav-tabs nav-justified">
    <li>Link</li>
    <li>Link</li>
    <li>Link</li>
</ul>

Solution

  • You can add a container with class col-xs-12 thus it will be stacked on very small displays. After all if you want it to be non-stacked in all displays just write a media query.

    Look there for media queries: http://getbootstrap.com/css/#grid

    If you share more code then I can be more specific on answer.