I using one of the Bootstrap 3 example to build a sidebar. It works fine. But how can fix its position like navigation bar so that I won't loose it while scrolling down.
I tried adding .uploadSideBar
class to <div class="col-xs-6 col-sm-3 sidebar-offcanvas sidebar-nav-fixed uploadSideBar"
like this
.uploadSideBar {
margin-top:117px;
postion:fixed
}
But it did not work.
I think you're using the wrong selector. Use this one instead, I've tested it on the link you gave and it works:
.well.sidebar-nav {
position: fixed;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.