piijj
piijj

Reputation: 21

Scrollable parent div with scrollable children div

I have a scrollable parent div with 2 children div that are also scrollable. How can I scroll div 2 on its own?

I have wrapped the 2 scrollable children div into <div style={{ display: 'flex', overflow: 'scroll' }}> and also added overflow: 'scroll' and set width into the children div but i can't scroll it on its own

enter image description here

Upvotes: 1

Views: 198

Answers (1)

Dasunx
Dasunx

Reputation: 2580

You can do this by individually adding the overflow: scroll to each div.

This may be helpful. https://jsfiddle.net/obx362my/25/

Upvotes: 1

Related Questions