No spaces between text and border of Lightbox, when loading html content

On my new Joomla 4.1x Website, I want to use MediaboxCK also, to show up articles in the lightbox. In order to keep things easy and simple, I am using Cassiopeia template. When I am loading an article from my Joomla site in the lightbox, there is no space between the first letters in a text line and the left border of the lightbox.
How can I achieve, that there will be always a distance between the content and the borders of the lightbox on all 4 sides? These spaces should not appear, when showing images or videos in the lightbox.

Further I would like to have the background image from the website also as background in the lightbox – but not, when images or videos are presented in the lightbox. How can I achieve this?
by raphi

Please Log in or Create an account to join the conversation.

Hi
this is more something that shall be managed in the template
Please give me the url of your page so that I can check
CEd

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: raphi

Please Log in or Create an account to join the conversation.

This is the very first step of my website, just to try out some extensions etc. It is latest Joomla with Cassiopeia without any user.css or any other modifications:
schonende-traumatherapie.de/index.php

With the last link on the homepage, you will start a lightbox via MediaboxCK and the copntent will be a Joomla article of this website, which I load via URL and ?tmpl=component.

And yes, it may be, that the "component-content" of the article will be presented by the template without any margin around the text. Therefore it could be a solution, when MediaboxCK can add margins automatically, before the content of the article is loaded in the lightbox. MediaboxCK should recognize the URL ending with HTML or there could be another parameter in the link, which opens the lightbox, telling the MediaboxCK, that there should be a margin filled in.

If I would change the template, so that there would be margins around any article, I fear, that this will lead to other side effects, which distort the layout of the template. Therefore I would prefer, the margins could be added by MediaboxCK.
by raphi

Please Log in or Create an account to join the conversation.

I understand but the margins shall be applied on the body into the iframe (else you will have the margin outside the scrollbar)
Mediabox CK can not add any margin into the iframe (unless using javascript which is not a wonderful solution here). The iframe loads its own content and this can not be accessed using CSS from the parent window

Mediabox CK is not launched inside the iframe, it calls it from the parent window.
Hope this is clear

you can try this if you want
Code:
#mbMedia > iframe { padding: 10px; background: white; }

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: ozneilau

Please Log in or Create an account to join the conversation.

This works, thank-you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.679 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 730 guests and no members online