How TO - Always Show Scrollbars


Learn how to always show scrollbars with CSS.


How To Force / Always Show Scrollbars

Add overflow: scroll; to show both the horizontal and vertical scrollbar:

Example

body {
  overflow: scroll; /* Show scrollbars */
}
Try it Yourself »

To only show the vertical scrollbar, or only the horizontal scrollbar, use overflow-y or overflow-x:

Example

body {
  overflow-y: scroll; /* Show vertical scrollbar */
  overflow-x: scroll; /* Show horizontal scrollbar */
}
Try it Yourself »

Tip: To learn more about the overflow property, go to our CSS Overflow Tutorial or CSS overflow Property Reference.


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.