Html – Force div to scroll if the text overflows HTML/CSS


So I have a div tag to sort of draw boxes around various sections, and of course make actual sections.

In one of the sections, there is more text than can be held in the div tag, so I want to for the text within the div tag to have a scroll bar to make it so the text doesn't overflow outside of the box.

How would I do that?

Best Solution

Use the following:

div {
    overflow: scroll;

If you want them to scroll only in one direction, you can use the overflow-x and overflow-y properties.