# Applying Scroll Bar (Horizontal & Vertical) to Code Snippets

**URL:** https://meta.discourse.org/t/applying-scroll-bar-horizontal-vertical-to-code-snippets/191825
**Category:** Support
**Created:** [May 27, 2021, 4:10pm UTC](https://meta.discourse.org/t/applying-scroll-bar-horizontal-vertical-to-code-snippets/191825 "2021-05-27T16:10:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![401Ott](https://avatars.discourse-cdn.com/v4/letter/4/4da419/32.png) [@401Ott](https://meta.discourse.org/u/401Ott)
#### Post date: [May 27, 2021, 4:10pm UTC](https://meta.discourse.org/t/applying-scroll-bar-horizontal-vertical-to-code-snippets/191825/1 "2021-05-27T16:10:49Z")

</div>

I like how in some of my code snippets a horizontal scroll bar that is applied for code that is very wide.

I have a post I’m drafting that has a lot of snippets. I’d like to apply a vertical scroll bar for any code snippet longer than 4 rows. Any way to manually do this?

Thanks in advance,  
Jesse

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 27, 2021, 5:24pm UTC](https://meta.discourse.org/t/applying-scroll-bar-horizontal-vertical-to-code-snippets/191825/2 "2021-05-27T17:24:46Z")

</div>

That’s controlled via CSS. By default the scrollbar happens when it’s taller than 500px. You can make it happen early in a theme component as explained in [How to make CSS changes on your site](https://meta.discourse.org/t/how-to-make-css-changes-on-your-site/168101).
