How to Remove the Scrollbar from a Lightbox

Follow

If a page that opens in a lightbox shows an unwanted scrollbar, you can hide it with custom CSS. Add the CSS to the lightbox page itself, not to the main page that opens it.

This is community code, not an official Unbounce feature. Unbounce Support can't troubleshoot custom code. Adding it to the lightbox page keeps scrolling on the main page unaffected.

Hide the lightbox scrollbar

Add the following to the lightbox page's Stylesheets section:

<style>
  body::-webkit-scrollbar { display: none; }
  body { overflow: hidden; -ms-overflow-style: none; }
</style>

Two things commonly cause the scrollbar in the first place. One is changing the Border settings while the entire lightbox section is selected. The other is a third-party remarketing or pixel tag that adds a small hidden iframe. If the scrollbar remains after you add the CSS, check for both.