Trying to make a div scrolls its content inside of a div with max-height:(px);But whenever i set the height in percentage the scroll does not work?

To set a percentage height, its parent element(*) must have an explicit height.
Alternatively, all modern browsers and IE>=9 support new CSS units relative to viewport height (vh) and viewport width (vw), for example:

.div{
height: 90vh;
overflow-y: auto;
}

Leave a Comment