Page 1 of 1

how to automatically center content in a light box

Posted: Thu Oct 06, 2022 4:59 pm
by Mariasol
hello,

the content of my light box is a page(linkted) that only contains a card with links (full page, no layer)
property of the page: center horizontally and vertically in the browser window.
there are breakpoints so that the card adapts to different screens.

but once published the content of the light box is not centered (vertically, horizontally) according to the different screen sizes.
the light box is set to fancybox in the properties of the 2 pages.
I did not find options in : http://fancybox.net/api.

thank you if you find me a solution,
Mariasol
ps: sorry if my english is not good but i am french speaking

Re: how to automatically center content in a light box

Posted: Thu Oct 06, 2022 5:32 pm
by Pablo
I am not sure if fancybox support this.

Maybe it is better to use a dialog instead?

Re: how to automatically center content in a light box

Posted: Thu Oct 06, 2022 9:04 pm
by Mariasol
by clicking on a card (card 1), I want to display another card(card2) in full page and centered (if possible modal) but I would like, if possible, map 2 to be elsewhere so as not to overload the weight of the page before the 1st map is requested.

I can put a link on the 1st card to display a dialog box but how then specify to display the 2nd card in this dialog box?

whether by link or by events in this 1st card, I would like that by clicking on it a 2nd card is displayed in full screen or in the middle of the window.

thank you for your help especially if you find a solution

Re: how to automatically center content in a light box

Posted: Fri Oct 07, 2022 6:15 am
by Pablo
You can either place the card directly inside the dialog or use an inline frame inside the dialog to display another page.
To center the card inside the other page, you can use a flex container in that page.

Re: how to automatically center content in a light box

Posted: Fri Oct 07, 2022 1:45 pm
by Mariasol
thank you, I'll try that :D