Hi, the lightbox can be fully controlled via themes. For the best control, you can create a custom theme and add some CSS like the following (depending on what element(s) you want to center):
.slb_theme_{your-theme-name} .slb_data_title {
display: block;
text-align: center;
}
See SLB’s Themes documentation for full details.
Thread Starter
saxamo
(@saxamo)
Thanks for the reply. I would prefer to just add additional CSS to my current theme. I tried adding this but the caption stayed the same way when you click on the image.
.slb_data_content {text-align: center;}
If you go to my website you can see by clicking on the image when it pops up the text I am talking about. In wordpress under themes which I am sure you are aware of is “an additional css” option. Would this work or is there other additional css required?
.slb_data_title { display: block; text-align: center; }
The title thing has me confused.
Thread Starter
saxamo
(@saxamo)
I was able to figure it out. In the wordpress/appearance/customize/additional css I wrote this:
slb_viewer_wrap
.slb_theme_slb_baseline * {
text-align: center !important;
}
Everything is working as it should now.. Thanks.. Unless there is a better way to write it or do it this thread can be closed. π
I was able to figure it out. In the wordpress/appearance/customize/additional css I wrote this:
slb_viewer_wrap
.slb_theme_slb_baseline * {
text-align: center !important;
}
That CSS will cause all elements in the lightbox to be center-aligned. Generally, you want the CSS to be as specific as necessary so as to not affect other elements on the page.
While issues may not be apparent currently, globally applied CSS may cause unexpected behavior.
Finally, please note that creating a custom lightbox theme is the recommended approach, as external CSS may conflict with future updates to the default themes.