To handle overflowing content within an element, you can utilize the CSS property overflow
:
#container {
height: 100%;
width: 300px;
overflow: auto;
}
The overflow
property determines how excess content is managed within the boundaries of an element.
This property controls whether to truncate content or display scrollbars when the content inside an element exceeds the available space.
Please Note: The overflow property is effective for block-level elements with a specific height defined.
For more information - W3Docs
Additional Resources - MDN Web Docs