Remove scroll from the Collapse component

I’d like to remove the scroll effect when I click on the button in the Collapse component. I just want the hidden target div to display, but with no accompanying page scroll. Any ideas on how to achieve this?

By adding position: absolute and a Z-index to the collapse content div
Each div has a unique ID
add this for each of your collapse content divs

#collapse-1 {
  z-index: 1050;
  position: absolute;

but don’t have it at the bottom of your page, there you will not see it because the page will not scroll

Thanks, but unfortunately it breaks the layout and doesn’t remove the scroll effect.


Here is an example that does remove the scroll effect