Per Aranda
Per Aranda

Reputation: 149

Bootstrap 3 - Scrollable content div

I'm using Bootstrap 3 and I'm trying to make a scrollable content DIV. I have a grid with a left side navigation and a top bar and in the middle I have the content that should be scrollable.

It works when I use a fixed height on the content div...but I want to use 100% instead.

<div  class="col-lg-12 col-md-12 col-sm-12" style="height:100%;overflow-y:auto;">
some content...
</div>

CSS:

html,body
{
 height:100%;
 overflow:hidden;
}

How could I get this to work with height:100%;

Thanks!

Upvotes: 14

Views: 57552

Answers (1)

hugocabral
hugocabral

Reputation: 816

You can add pre-scrollable class for the div you want to scroll.

If you search the .css there is a max-height but you cant edit. So you have sure it will maximize the page in the window for that max value.

Hope it helps, i used the same for a one-page with scrollable divs.

Upvotes: 30

Related Questions