Kshitiz Shankar Kshitiz Shankar - 1 year ago 82
Javascript Question

Create Responsive Tabs using Bootstrap (They should get stacked automatically on smaller screens)

How can I create responsive tabs which get stacked automatically using bootstrap.
The code for my navs is -

<ul id="tabslist_navs" class="nav nav-tabs">
<li><a href="#">Normal</a></li>
<li><a href="#">Hover</a></li>
<li><a href="#">Selected</a></li>
<div class="tab-content">

I need them to get converted to stacked tabs when viewed on small screens.
Right now it just moves the tabs into multiple likes which looks ugly.
I want something like the navbar collapse but without the button to activate the collapse.

Answer Source

This should work:

@media (max-width: 480px) { 
    .nav-tabs > li {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download