Reputation: 112
I don't want the scroll to be opened when clicking the image for Lightbox
Error link : https://cdn.pbrd.co/images/HSzC8Ly.jpg
Source Code download link : https://lokeshdhakar.com/projects/lightbox2/
Upvotes: 0
Views: 499
Reputation: 112
Problem solved.
The height is taking a very high value. This height comes from the lightbox.js file. The overflow problem is troubleshooted when you do height:100% in the css class
Add the following line to the .lightboxOverlay class in css.`
.lightboxOverlay {height:100% !important; /* for Lightbox Scroll hide */}
Upvotes: 1
Reputation: 1813
You need to add the option disableScrolling
to prevent the page from scrolling while Lightbox is open:
lightbox.option({
'disableScrolling': true
})
Upvotes: 0