Making a div vertically scrollable is easy by using CSS overflow property. There are different values in overflow property. For example: overflow:auto; and the axis hiding procedure like overflow-x:hidden; and overflow-y:auto;. It will make vertical and horizontal scrollable bar and the auto will make only vertically scrollable bar.
For vertical scrollable bar use the x and y axis. Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar. Here the scroll div will be vertically scrollable.
Example 2: In this example use auto in place of overflow-x:hidden; and overflow-y:auto; to make div vertically scrollable.
- How to make horizontal scrollable in a bootstrap row?
- How to vertically center text with CSS?
- How to Vertically Align Text Next to an Image using CSS ?
- How to align objects vertically when working with grids in CSS ?
- How to vertically flip a text canvas using Fabric.js ?
- How to vertically and horizontally align flexbox to center ?
- How to vertically align text inside a flexbox using CSS?
- How to get card vertically centered between search bar and bottom of the viewport?
- How to make an image center-aligned (vertically & horizontally) inside a bigger div using CSS?
- How to fixed one column and scrollable other column or columns in Bootstrap ?
- ES6 | Decision Making
- Making a QR code for a website
- Making your WordPress Website More Secure
- Python | Making an object jump in PyGame
- Tips For Making Coding Websites Accessible
- Making your first Open Source Pull Request | Github
- Decision Making in R Programming - if, if-else, if-else-if ladder, nested if-else, and switch
- Weighted Sum Method - Multi Criteria Decision Making
- Difference between Fetch and Axios.js for making http requests
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : ankit bajpai