Hey, I’m looking for some elegant and simple way to make fixed navbar stay inside parents div.container.
Here’s the code, that I copied and changed a little bit from official documentation:
Hey timotheap.
Yes I forgot to put a closing tag in the codepen example, but it doesn’t matter because browser put it for me. Anyway, I’ll what I try to explain what I mean: http://v4-alpha.getbootstrap.com/components/navbar/#collapsible-content - I copied the html code from here, because I wanted my page to show navigation only when content is meant to be shown.
Then, I’ve read in the http://v4-alpha.getbootstrap.com/components/navbar/ => [Basics], that =>
" Navbars and their contents are fluid by default. Use optional containers to limit their horizontal width."
So that’s what I 've done therefore my navbar was inside container, but after I added navbar-fixed-top class to nav tag, it spread to whole width of the body.