How to Scroll DIV Tags with HTML and CSS

Scroll can not only appear when the website page exceeds the height of the monitor, but scroll can also be used in a div tag even though the height does not exceed the width of the monitor.

This can be useful for saving space or free space on the website, usually this is widely used for chat applications, report tables, etc.

Here’s how to make a div to have scroll with html and css

Step One: Create a div tag with the class name scroll, first with HTML.

Lorem ipsum dolor sit amet.

….

….

Step Two: Then in the css you can add it like this

.scroll{
width: 300px;
background: orange;
padding: 10px;
overflow: scroll;
height: 300px;

/* additional script specifically for IE */
scrollbar-face-color: #CE7E00;
scrollbar-shadow-color: #FFFFFF;
scrollbar-highlight-color: #6F4709;
scrollbar-3dlight-color: #11111;
scrollbar-darkshadow-color: #6F4709;
scrollbar-track-color: #FFE8C1;
scrollbar-arrow-color: #6F4709;
}
the most influential script there is overflow: scroll, and height: 300px;

because this can make a div that was previously high scroll because it is only made 300px high, even though later the div will only have a small amount of space, the space for scrolling will still be visible.