make div scroll when contents too big

In addition to @mr-alien answer: you can use max-height to limit the size of a container and in the same time to make it fit the content:

.container {
   /* Optional - You can set a  min-height : whatever px; for reserving some space*/
   max-height: 200px; /* Fix a max-height here */
   overflow: auto; /* Optionally you can also use overflow: scroll; */
}

You haven't shared any markup here but if you are willing to have a fixed height just use this

.container {
   /* Optional - You can set a  min-height : whatever px; for reserving some space*/
   height: 200px; /* Fix a height here */
   overflow: auto; /* Optionally you can also use overflow: scroll; */
}

Tags:

Html

Css

Scroll