Giter VIP home page Giter VIP logo

Comments (10)

tmthyjames avatar tmthyjames commented on May 15, 2024 4

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.

 avatar commented on May 15, 2024

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.

 avatar commented on May 15, 2024

I'm going to keep this open for the time being as a "to-do" item.

from startbootstrap.

kyriakos77 avatar kyriakos77 commented on May 15, 2024

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.

erpheus avatar erpheus commented on May 15, 2024

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.

 avatar commented on May 15, 2024

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.

cacpmw avatar cacpmw commented on May 15, 2024

@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.

nicolaspluhator avatar nicolaspluhator commented on May 15, 2024

@cacpmw

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.

eric218110 avatar eric218110 commented on May 15, 2024

Caso esteja usando o bootstrap basta adicionar a classe pre-scrollable no sidebar

from startbootstrap.

shravanm05 avatar shravanm05 commented on May 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.