cssipadscrolllightboxlightbox2

Default Lightbox2 appearing at the top of the page instead of in the viewport on iPad


I am using the default Lightbox2 for my website. When clicking an image, the Lightbox works perfectly except that the box (along with the darkened background) appear at the top of the page, rather than in it's scroll position. This only happens on the iPad. Is there something to adjust in the lightbox.css that I am missing?

Thank you in advance!


Solution

  • use this css to dark background,give fixed position using css also make top, left,right, bottom to 0 so it fits to screen and content inner to it will scroll using overflow auto css

    position: fixed;
    z-index: 999;
    /* padding-top: 100px; */
    left: 0;
    top: 0;
    bottom:0;
    right:0;
    overflow: auto;