Open In App

How to set the overflow property to scroll in CSS ?

Last Updated : 23 Jul, 2025
Comments
Improve
Suggest changes
1 Like
Like
Report

In this article, we will see how to set the overflow property to scroll in CSS. The overflow property is used to control the big content. It tells what to do when an element's content is too big to fit in the specified area. When the overflow property is set to scroll, the overflow is clipped, but a scrollbar is added to see the rest.

Example 1: In this example, we are using the overflow scroll.

Output: 

 

Example 2: In this example, we have to use the overflow-x property to scroll. The overflow-x property is used when the content is overflown at the left and right edges.

Output: 

Example 3: In this example, we have used the overflow-y property to scroll. The overflow-y property is used when the content overflows at the top and bottom edges

Output: 


Next Article

Similar Reads