Steve Steve - 2 years ago 184
HTML Question

Overflow-y scroll in a nested div?

I have a container div with 2 columns. I need to set the container at a percentage of the view, so I used


Inside the left column is a bootstrap panel and a lot of content. I want that div to scroll when it doesn't fit, and it refuses. I realize I must be missing something simple.

Answer Source

I think the issue here is that the panel doesn't have a max-height and can just keep getting bigger, therefore it won't scroll.

I got it working by adding max-height: 75vh; to .left-pane.

If you mean't you want the whole container to scroll, just make that height to max-height.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download