Overflow: auto for overflow child: hidden div?

I have a div that needs to be set to overflow: hidden, and I want one of its child divs to scroll through the contents; however, no matter how I play with the overflow on a child, it will not scroll. How can I override inheritance?

+3
source share
1 answer

You probably did not specify the height on the inner div.

Without a height on a div, its height will be the height of its contents, and therefore, it will never need to scroll. Of course, it is contained in the outer div, which has height and overflow: its hidden content disappears under the border of the outer div.

+8
source

Source: https://habr.com/ru/post/1714126/


All Articles