Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 3, 2019 06:11 pm GMT

Prevent Page Scrolling When a Modal is Open

Please stop me if you've heard this one before. You open a modal, scroll through it, close it, and wind up somewhere else on the page than you were when you opened the modal.

That's because modals are elements on a page just like any other. It may stay in place (assuming that's what it's meant to do) but the rest of page continues to behave as normal.

See the Pen
Avoid body scrollable in safari when modal dialog shown
Read article

The post Prevent Page Scrolling When a Modal is Open appeared first on CSS-Tricks.


Original Link: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks