Site logo

Archived topic

Issue with container margin changes behind modal image popup

7 replies · Started by Carsten on August 4, 2021

Viewing posts 1–8 of 8

Hi there I have an issue which I haven't been able to solve yet.

When I open an image as modal pop up, the site container kicks to the side, and it appears like the margin of the container changes. I have contacted the developer of the Flexi gallery plugin, but he says that it is not related to the plugin.

https://imgur.com/k4soJBq
https://imgur.com/C5LUffk

The issue is easier to see on the page, if I can ask you to login to have a look, it's in the button on the profile landing page.

Thanks!

If you take a closer look when opening and closing the image, you will notice that the container behind the modal overlay makes a "side kick", and you will see that the container margin is different when the image is opened and closes

Ha ha, we can't have that ;-), sorry for the inconvenience,

I think the best way to see the issue is when closing the modal vindue, then the offset of the site container should be easy to see. Sorry, my screen recorder does not work.

Oh thank god, I finally see the shifting.

So it is caused by the plugin because they added this CSS which adds a margin to the body when the image is open:
https://www.screencast.com/t/dHDLoW1di0

.compensate-for-scrollbar {
    margin-right: 17px;
}

I can't believe they think it's a theme issue.

Anyway, you can try this CSS to override it:

body.compensate-for-scrollbar {
    margin-right: 0 !important;
}

Let me know if this helps :)

Hi Ying, thank god I wasn't the only one who could see this ;-)

I'm very happy that you were able to solve this issue for me, it has been nagging me for a long time now, not able to find out what was causing it.

The code helped indeed

Thanks again!

Carsten

Great, glad to hear that ;)

You are very welcome!

This archived topic is closed to new replies.