Thread Locked This thread is locked - replies are not allowed.


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: 21 Aug 22, 18:44 Last Post By: RJLaBella
RJLaBella

Posts: 46
Registered: 22-Apr-2007
How to center the Lightbox Caption
Posted: 20 Aug 22, 23:51
 
I would like to be able to have the Lightbox Caption centered rather than left justified. Is there a hack that can produce that?
Laza

Posts: 1,575
Registered: 6-Sep-2005
Re: How to center the Lightbox Caption
Posted: 21 Aug 22, 08:54   in response to: RJLaBella in response to: RJLaBella
 
Normally, all the buttons go to the right, this is why the caption is aligned left.

You can avoid large empty spaces in the caption by using Settings / Tiger / Lightbox / Caption / Adapt to content width option.

If you prefer the fixed width caption area and have the comment still centered, use this CSS "hack" (Settings / Tiger / Advanced / Custom code / CSS box):
.lightbox .lightbox-caption .caption { flex: 1; }
@media screen and (min-width: 40em) {
    .lightbox .lightbox-caption.hasbuttons .caption > * { 
        text-align: center;
        width: auto;
    }
}

Note, this will center the text in the area left to the buttons, not the whole page.
RJLaBella

Posts: 46
Registered: 22-Apr-2007
Re: How to center the Lightbox Caption
Posted: 21 Aug 22, 18:42   in response to: RJLaBella in response to: RJLaBella
 
Perfect, except that I didn't check "Adaot to content width" and it appears exactly as I hoped.
Thanks,

Edited by: RJLaBella on 21 Aug 2022, 12:44
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums