Comments (10)
Just tested this and putting it here for anyone still interested.
.sidebar{
overflow-y: scroll;
position: fixed;
}
Then:
var topNavBar = 50;
var footer = 48;
var height = $(window).height();
$('.sidebar').css('height', (height - (topNavBar+footer)));
$(window).resize(function(){
var height = $(window).height();
$('.sidebar').css('height', (height - (topNavBar+footer)));
});
If you don't have a top navbar or footer, then just remove those.
from startbootstrap.
overflow:auto should do the trick. I will have to play around with it to make it work. We're working on a big update to Start Bootstrap at the moment and then we'll be revisiting all of our themes and patching up any small bugs/problems like this one.
from startbootstrap.
I'm going to keep this open for the time being as a "to-do" item.
from startbootstrap.
Thank you, please do keep up the good work.
In the meanwhile, I was able to work around this issue as follows:
.navbar-static-side {
height: 90%; /_Setting to 100% doesn't work, because of the margin-top:51px setting. The correct value should be 100%-51px, but I don't know how to set this with css :-( */
overflow-y: auto; /Show the scrollbar/
position: fixed; /_This did the trick! The original value was "absolute" /
margin-top:51px; / Original Value /
width:250px; / Original Value /
z-index: 1; / Original Value */
}
Please note that I am not a css expert, so the solution is a result of a "trial-and-error" approach.
from startbootstrap.
As an addition to the previous answer, height = 100% - 51px is specified like this (beware of browser support):
height: 90%;
height: calc(100% - 51px);
Also, for those using this scroll fix, the css should be placed inside the media query for navbar-static-side to not affect mobile behavior.
from startbootstrap.
In order to avoid further issues with the fixed side bar we're going back to static in the next release of SB Admin 2.
from startbootstrap.
@kyriakos77 what file did you add that in? I have the same problem but with sbadmin 1. I need to add a scrollbar to the menu but I cant find that class anywhere
from startbootstrap.
Add the following to your css/scss:
.navbar-sidenav { overflow:hidden; }
This will add a hidden scrollbar to the sidenav. Adding a visible scrollbar throws off the tooltips when the sidenav is collapsed. I could not solve that part but would prefer the scrollbar to be visible if someone else has a solution.
from startbootstrap.
Caso esteja usando o bootstrap basta adicionar a classe pre-scrollable no sidebar
from startbootstrap.
You can add vertical scroll bar by adding this
$(".button-collapse").sideNav();
var el = document.querySelector('.custom-scrollbar');
Ps.initialize(el);
from startbootstrap.
Related Issues (20)
- Slider makes the webpage bounce on mobile devices HOT 1
- Download Tempalte For Software Distribution HOT 1
- how to scroll in side menu ? HOT 2
- 404 on /posts
- How to add reference to ported themes? HOT 2
- sb-admin-2 with separate menus HOT 1
- Decrease the side menu width on SB Admin 2 HOT 1
- Menu-links skip to the top in screenreader HOT 1
- How to run startbootstrap
- fix Resources Bootstrap Development Tools links
- Improve seo theme- Start Bootstrap
- Organization Name HOT 12
- Can anyone upload ready to use theme ? HOT 1
- how to add vertical scrollbar in sidebar
- I have a suggestion to make start bootstrap better HOT 3
- Installing HOT 1
- README.md translation
- fix the header and sidebar
- Scroll-to-top button
- Repo Not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from startbootstrap.