I've successfully implemented tab switching, but I need to make the content fixed. How can I achieve this so that no matter the length of the content, it remains fixed in its position when switching tabs?
The current issue is that when the content is long, it extends the layout causing unwanted scrolling, and if the content is short, it still takes up unnecessary space.
Is there a way to set the layout to be fixed regardless of the content length?
.tabs{
margin-bottom:25px;
}
.nav-tabs{
}
/* More CSS code here */
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div class="tabs">
<ul class="nav nav-tabs">
/* Tab HTML code goes here */
</ul>
<div class="tab-content">
/* Tab content goes here */
</div>
</div>
Thank you for your help!