Title: Scroll bars
Last modified: June 18, 2023

---

# Scroll bars

 *  Resolved [Richard Patterson](https://wordpress.org/support/users/richardpatterson/)
 * (@richardpatterson)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/)
 * Is it possible for vertical columns beside each other to scroll separately and
   each display a scroll bar when it extends below the bottom of the user’s window?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16829274)
 * Yes this should be possible, if you make a grid layout with columns and then 
   add your scrollable content into these columns.
 *  Thread Starter [Richard Patterson](https://wordpress.org/support/users/richardpatterson/)
 * (@richardpatterson)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16831056)
 * I can’t find any reference in the documentation to “scrollable content” or “scrollable”
   or “scroll bars.” I have two columns next to each other and cannot figure out
   how to make them scroll separately. They only seem to scroll together as the 
   whole page scrolls.
 * Actually I have a sticky header above the columns that does not scroll. Both 
   the columns scroll under it. I added a Sticky Block plug-in to make the left 
   column stay where it is, but if the window is not big enough the bottom of the
   column is never visible, and I would like for it to be scrollable on its own.
 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16832192)
 * Hi, you can give the two columns each the css class of e.g. scroll-300
 * This class is then limited to 300px height and the overflow should be scrollable.
 * You would need to add this css class via your theme or other methods to “add 
   custom css”:
 *     ```wp-block-code
       .scroll-300{
          max-height: 300px;
          overflow: scroll;
       }
       ```
   
 *  Thread Starter [Richard Patterson](https://wordpress.org/support/users/richardpatterson/)
 * (@richardpatterson)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16834878)
 * Thanks. I haven’t yet ventured into CSS coding or customizing, but I may try 
   this. The only problem I see is that this depends on setting a fixed maximum 
   pixel height for the class. Ultimately what I think I would like is to set it
   to scroll whenever the window causes overflow. Would there be a function which
   set the max-height of the block to a function of the detected window height?
 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16835791)
 * Hi, yes there is something called vh this is the percentage of the Viewport Height
   and 100 vh is equal to the browser window’s height.
 * Every Browser handles vh differently, some exclude the bookmark bar and thus 
   this looks different to everything.
 * I don’t get tho why you would want to limit the content to the browser height,
   since this is just default behavior, always when the content exceeds the height
   of the browser there will be a scrollbar.
 *  Thread Starter [Richard Patterson](https://wordpress.org/support/users/richardpatterson/)
 * (@richardpatterson)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16837687)
 * Thanks again. I admit I am somewhat confused about all this. My original problem
   was that I had the left column in a Sticky Block (using the plug-in). It contains
   a list of topics which are links to other pages. The right hand column retains
   the post text, which can be much longer. I did not want the sidebar list of topics
   to scroll off the screen when the reader scrolled to read the text. I thought
   it was fine, until I realized that if I resized the window to a smaller height,
   the bottom of the list in the left sidebar was never visible. I thought the best
   solution would be for the list to have its own scroll bar and scroll separately
   within the frame of the list. Since there appears to be no way to explicitly 
   add a scroll bar to a block to enable it to scroll within a limited space on 
   the window, I was wondering if there was any way to achieve this.
 * I appreciate your patience and efforts to help.
 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16838967)
 * Hi,
 * thanks for the clarification. There is no way to limit the height of a Block 
   and thus make it scrollable so you need to use css.
 * You can use either px or vh or % to define the height.
 *     ```wp-block-code
       .scroll-300{
          max-height: 300px;
          overflow: scroll;
       }
       ```
   
 * You just have to give the Element that you want to make scrollable this class
   of “scroll-300” and then add the custom css via your preferred way (there are
   many guides to do this)
 * Note that you have to give the Element the class name without the dot ( . ) but
   in the css it self the dot needs to be present in front of the class name.
 *  Thread Starter [Richard Patterson](https://wordpress.org/support/users/richardpatterson/)
 * (@richardpatterson)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16840904)
 * Thanks again. Eventually I shall try this. Right now I am going to stay focussed
   on the content, at some point I’ll dive into CSS.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Scroll bars’ is closed to new replies.

## Tags

 * [columns](https://wordpress.org/support/topic-tag/columns/)
 * [scroll bars](https://wordpress.org/support/topic-tag/scroll-bars/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [Richard Patterson](https://wordpress.org/support/users/richardpatterson/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/scroll-bars-7/#post-16840904)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
