Looks like this, right?
To make a child `div`
scrollable is to give it a fixed or constrained height. To achieve it, apply `
overflow: auto
or
overflow-y: scroll
Here's an example CSS:
.layout-container {
display: flex;
height: 100vh; /* => Fill the full screen */
}
.sidebar-scrollable {
width: 250px;
height: 100%; /* => Fill the parent height */
overflow-y: auto; /* => Enable vertical scrolling */
padding: 10px;
box-sizing: border-box;
background-color: #f9f9f9;
}
.main-content {
flex: 1;
padding: 20px;
}
Hopefully, this will help