Center Lightbox Caption and Title - Aaron Meyers

Center the Lightbox Caption and Title

By default your Lightbox has its title and caption aligned on the left side of the lightbox. However, if you would like to center it, you can use the following code: Add the following code to your theme's Advanced CSS settings:

/* Move the lightbox title to the center */
.sm-lightbox-basic .yui3-widget-ft .sm-lightbox-title {
   position: absolute;  /* Force the position to be where we want it */
   left: 50%;             /* Place the title in the middle of the page */

/* Move the caption down 30px so it doesn't overlap with the title */
.sm-user-ui .sm-lightbox-basic .yui3-widget-ft .sm-lightbox-caption {
   position: absolute;
   left: 50%;
   top: 30px;
Lamah has some additional tweaks, or even better code here: From:


Powered by SmugMug Log In