Overlay Centering - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Overlay Centering

TD

Thomas Deliduka

SP Page Builder 3 years ago

On our website: https://www.stpatrickcolumbus.org/

I've got text that is overlayed on top of the image. In order to get it in that position, I chose Advanced -> Enable Custom Position I then set it to Absolute positioning and I set the height.

But in order to center it, I had to go to Style and set a left/right margin. Because anything else doesn't seem to work.

I tried setting the X axis on Absolute to 50% but that just starts it at the halfway point. Setting it to 25% doesn't seem to work. I tried -50% and it was clear off the page.

How can I get an item that is overlayed on top of something to center on the page? Because right now the margin thing isn't really working. It looks pretty bad in some cases.

0
3 Answers
Pavel
Pavel
Accepted Answer
3 years ago #55919

Hi. Unfortunately, there are no settings for this. This can be done only through CSS. Disable all the settings that you tried to do for this and use the following code.

#sppb-addon-wrapper-1585855657007 {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
0
TD
Thomas Deliduka
Accepted Answer
3 years ago #55946

Thanks, I couldn't put the custom CSS into the element itself. I had to go to the template and add it to the global custom CSS. After doing that, it worked fine. I made some slight modifications for my needs but that works.

Thanks!

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 3 years ago #55978

Hi

Glad to know that this issue is fixed. Thanks Pavel

-Regards

0