Giter VIP home page Giter VIP logo

Comments (5)

tmthyjames avatar tmthyjames commented on May 15, 2024 1

The answer didn't work for me so I used:

.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

There is a minimum height set to the page wrapper which is causing there to be additional scrolling on the blank page. This is intentional, and can be removed if you like by changing the minimum height on the page wrapper.

from startbootstrap.

simonfranz avatar simonfranz commented on May 15, 2024

changing the min-height of the page-wrapper does change the appearance of the scrollbars, but then the background-color og the sidebar pushes into the content. and the content isn't completely white anymore, any other idea how to fix that?

from startbootstrap.

 avatar commented on May 15, 2024

You can add a 100% height to html and body elements. Add 100% height to the
wrapper, and then 100% height to the page wrapper. After that you can fix
the menu bar using navbar-fixed-top instead of navbar-static-top. Finally,
add 50px of padding to the body element to adjust for fixing the menu bar.

Example Code:

Replace this:

/* Global Styles */

/* ------------------------------- */

body {
background-color: #f8f8f8;
}

/* Wrappers */

/* ------------------------------- */

#wrapper {
width: 100%;
}

#page-wrapper {
padding: 0 15px;
min-height: 568px;
background-color: #fff;
}

@media(min-width:768px) {
#page-wrapper {
position: inherit;
margin: 0 0 0 250px;
padding: 0 30px;
min-height: 1300px;
border-left: 1px solid #e7e7e7;
}
}

With this:

/* Global Styles */

/* ------------------------------- */

body {
background-color: #f8f8f8;
padding-top: 50px;
}

body,
html {
height: 100%;
}

/* Wrappers */

/* ------------------------------- */

#wrapper {
width: 100%;
height: 100%;
}

#page-wrapper {
padding: 0 15px;
min-height: 568px;
background-color: #fff;
}

@media(min-width:768px) {
#page-wrapper {
position: inherit;
margin: 0 0 0 250px;
padding: 0 30px;
min-height: 100%;
border-left: 1px solid #e7e7e7;
}
}

This should give you perfect, 100% page heights with no overflow or
unnecessary scroll bar. We didn't want to include this with the distributed
version because it borders on a more stylistic change that people might not
want. For your case though, this should work perfectly!

On Wed, Feb 12, 2014 at 4:19 PM, simonfranz [email protected]:

changing the min-height of the page-wrapper does change the appearance of
the scrollbars, but then the background-color og the sidebar pushes into
the content. and the content isn't completely white anymore, any other idea
how to fix that?

Reply to this email directly or view it on GitHubhttps://github.com//issues/39#issuecomment-34919057
.

from startbootstrap.

gbsanthosh avatar gbsanthosh commented on May 15, 2024

update the code "minimum height overflow is not working on menu"

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.