• Resolved sarahsas

    (@sarahsas)


    Hi NextGen team! Quick question… I’ve got a client who is very particular re: design and he REALLY wants the X (exit button) in the lightbox to display in the upper right corner of the IMAGE rather than the upper right corner of the viewport. I can see in the CSS that both the img and the .sl-close button are fixed position when the lightbox is open, so I can’t think of a clean way to implement this for him with each image in the gallery being a different shape/size… Is this even a possibility? Am I missing an obvious way to do this in the settings somewhere? Please advise, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Fellow user (not support) but I’m confused by your question. On my gallery, that seems to be where it is. Or do you mean even closer in to the image?

    https://polywogg.ca/pandafamilygallery/yr2005/01-january/

    Paul

    Thread Starter sarahsas

    (@sarahsas)

    Example here: https://new.designwell.com.au/projects/

    Notice when you click on any of the images in the gallery, once you are in the lightbox, the X to close out of the lightbox is always in the far upper right corner? absolute position 30px from top and right…

    Client wants the X to be at the top right corner of the actual IMAGE, not top right corner of the actual screen window… make sense?

    For this to happen I think there would need to be an extra container div around the X element and the IMG together… but I want clarification from the makers of the plugin to see if they know another way…

    Yes, I see now. And you may have to wait for official support.

    I’m assuming that you’ve already tried simply reducing the width of the lightbox viewport while leaving the page centred. I don’t know for all the photos, but the view I clicked on came nowhere near the width of the page on my screen (lots of padding to the side). My first thought was to reduce the existing container to move the edge in, not just the X.

    Or there may be a way to make the viewport responsive in total.

    I use a different lightbox effect, so I don’t have those issues…Good luck!

    Thread Starter sarahsas

    (@sarahsas)

    Thanks, but I think because all the elements are “fixed” position, and the positions seem to be auto-generated on load based on the image size so that it’s responsive, I don’t think changing the container size would work… I thought about changing the positions to relative and trying to work out the layout from there, but I suspect that’s going to REALLY mess with the overall functionality…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Position of the X in the lightbox’ is closed to new replies.