Title: Caption alignment
Last modified: August 30, 2016

---

# Caption alignment

 *  [dano222](https://wordpress.org/support/users/dano222/)
 * (@dano222)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/caption-alignment/)
 * Hi. I need to globally change the caption alignment for galleries to left instead
   of center. I was able to find an old support post with the following:
 * .mg-thumbs.mg-twocol ul li p.caption.below {
    text-align: center; }
 * I changed ‘center’ for ‘left’ and inserted it in my theme’s custom CSS section
   and it worked. However, the left alignment is not active anymore when the image
   is opened in lightbox (it is centered). How can I get the lightbox caption to
   be left aligned?
 * Also, for the alignment change I did to .mg-thumbs.mg-twocol, I assume this will
   only apply to two column layouts. Is there a way to apply a left alignment globally
   for captions? If not, could you please provide the names for all the different
   column layouts that I need to modify?
 * Thanks in advance!
 * [https://wordpress.org/plugins/maxgalleria/](https://wordpress.org/plugins/maxgalleria/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/caption-alignment/#post-6245064)
 * dano222,
 * For left alignment in the lightbox use:
 *     ```
       .mfp-title {
           text-align: left;
       }
       ```
   
 * As for the caption alignment for other layouts, it should work for all other 
   image tiles galleries if you remove the ‘.mg-thumbs.mg-twocol ul li’ so that 
   it is:
 *     ```
       p.caption.below {
         text-align: left;
       }
       ```
   
 * (edited)
    Alan
 *  Thread Starter [dano222](https://wordpress.org/support/users/dano222/)
 * (@dano222)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/caption-alignment/#post-6245222)
 * Hi Alan,
 * The code for the lightbox caption doesn’t seem to have any effect. I’m adding
   it to my main theme custom CSS just like the regular caption modification. Please
   let me know if you have any other ideas.
 * As for the regular caption,I wasn’t able to make it work with just the p.caption.
   below, so I ended up simply adding each name for 1 to 4 columns which works fine:
 * .mg-thumbs.mg-onecol ul li p.caption.below, .mg-thumbs.mg-twocol ul li p.caption.
   below, .mg-thumbs.mg-threecol ul li p.caption.below, .mg-thumbs.mg-fourcol ul
   li p.caption.below {text-align: left;}
 * Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Caption alignment’ is closed to new replies.

 * ![](https://ps.w.org/maxgalleria/assets/icon-128x128.jpg?rev=1225417)
 * [MaxGalleria](https://wordpress.org/plugins/maxgalleria/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxgalleria/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxgalleria/)
 * [Active Topics](https://wordpress.org/support/plugin/maxgalleria/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxgalleria/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxgalleria/reviews/)

## Tags

 * [alignment](https://wordpress.org/support/topic-tag/alignment/)
 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [gallery](https://wordpress.org/support/topic-tag/gallery/)
 * [left](https://wordpress.org/support/topic-tag/left/)

 * 2 replies
 * 2 participants
 * Last reply from: [dano222](https://wordpress.org/support/users/dano222/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/caption-alignment/#post-6245222)
 * Status: not resolved