Link to home
Start Free TrialLog in
Avatar of dlearman1
dlearman1Flag for United States of America

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-bottom {
  position: fixed;
 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.
Avatar of dlearman1
Flag of United States of America image


Hi Mandeep,

Thanks for the comment.  The demo is for a full-width layout which isn't what I want.
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial