Having trouble with responsiveness in my nav-tabs when I apply position:fixed
.
https://i.sstatic.net/BSiBe.png
The image above shows the actual view of my setup. I have two iframes - on the left side is the nav-tab (text-bucket, image-bucket...), in the middle is a slider, and on the right is another frame.
This is the HTML for the nav-tab:
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#home">Text Bucket</a></li>
<li><a data-toggle="tab" href="#menu1">Image Bucket</a></li>
<li><a data-toggle="tab" href="#menu2">Table Bucket</a></li>
<li><a data-toggle="tab" href="#menu3">View Selected Items</a></li>
<li><a data-toggle="tab" class="prev" href="#preview">Preview</a></li>
</ul>
I tried to make the entire nav-tab section fixed by adding position:fixed
.
CSS:-
.nav {
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
ul.nav-tabs {
position: fixed;
background-color: #fff;
z-index: 1;
/* width: 48%; */
}
.nav>li {
position: relative;
display: block;
}
.nav-tabs>li {
float: left;
margin-bottom: -1px;
}
https://i.sstatic.net/S4JTz.png
In the second image above, you can see that the preview tab stays out when I drag the middle slider to the left. This issue arises due to the use of position:fixed. If I remove it, the preview tab comes down responsively as expected.
Is there a solution to this? I want the tabs to remain position:fixed
, but also be able to adjust when dragging the slider.