Page Scrolling With a Modal in Oxygen

Sometimes, you may wish to have a page scrolling when a Modal (popup) is open in Oxygen. Some great examples of this may be a site-wide notice or a cookie-consent banner.

This is relatively easy to allow in Oxygen with the following CSS:

body.oxy-modal-active {
    overflow-y: scroll;
    height: auto;
    position: unset;

After this CSS is added to a Stylesheet or Code Block element, you can scroll the rest of the page.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    © 2020-2024 Luxibay
    Please let us know what's on your mind. Have a question for us? Ask away.
    This field is for validation purposes and should be left unchanged.