In the current version of Bootstrap (3.3.2), there is a good way to achieve a fixed sidebar for navigation.
This solution also works well with the re-introduced fluid-container class, which means it's easy to get a flexible full-screen layout.
Usually you need to use fixed widths and margins, or the navigation will overlap the content, but using an empty placeholder column, the content will always be in the right place.
The setting below wraps the content when the window is resized to 768 pixels and frees up fixed navigation.
See http://www.bootply.com/ePvnTy1VII for a working example.
CSS
@media (min-width: 767px) { #navigation{ position: fixed; } }
HTML
<div class="container-fluid"> <div class="row"> <div id="navigation" class="col-lg-2 col-md-3 col-sm-3"> <ul> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> </ul> </div> <div class="col-lg-2 col-md-3 col-sm-3 hidden-xs"> </div> <div id="main" class="col-lg-10 col-md-9 col-sm-9 fill"> ... Huge Content ... </div> </div> </div>
See my answer at fooobar.com/questions/61540 / ....
source share