I'm attempting to create tabs that are vertical on wider screens and horizontal on smaller screens, but I'm unsure of how to accomplish this. I have experimented with adding flex-md-column
and flex-lg-column
to the nav tabs:
<ul class="nav nav-tabs flex-md-column flex-lg-column" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="info-tab" data-toggle="tab" href="#info" role="tab" aria-controls="info" aria-expanded="true"><i class="ion-compose"></i> Info</a>
</li>
<li class="nav-item">
<a class="nav-link" id="stats-tab" data-toggle="tab" href="#stats" role="tab" aria-controls="stats"><i class="ion-arrow-graph-up-right"></i> Statistics</a>
</li>
<li class="nav-item">
<a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact"><i class="ion-email"></i> Contact</a>
</li>
</ul>
However, this results in the tabs taking up the full width, pushing the tab content below. How can I resolve this issue so that the tabs only take up the necessary width, allowing the content to align next to the nav-tabs? I've attempted to set fixed widths for the nav-items, but that solution didn't work.