dlearman1
asked on
How to create a fixed width, fixed position header in Bootstrap
The default fixed-top navbar in Bootstrap spans the full width of the viewport. I want to contain it within a container div. I am able to contain the left side using the following CSS override:
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
width:100%;
right: auto;
left: auto;
z-index: 1030;
}
But the navbar still extends full window on the right. Giving a definite width to the navbar does work, but it destroys the menu collapse.
Any help would be greatly appreciated.
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
width:100%;
right: auto;
left: auto;
z-index: 1030;
}
But the navbar still extends full window on the right. Giving a definite width to the navbar does work, but it destroys the menu collapse.
Any help would be greatly appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the comment. The demo is for a full-width layout which isn't what I want.