While working with the default fixed-top navbar in Bootstrap, I encountered an issue where it spans the full width of the viewport. In order to contain it within a specific container div
, I tried applying a CSS override for the left side:
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
width:100%;
right: auto;
left: auto;
z-index: 1030;
}
However, even after this override, the navbar still extends out to the full window on the right.