Okay
  Public Ticket #1925409
Images' caption alignment in pages
Closed

Comments

  •  3
    gfaniz started the conversation

    Dear support,

    It appears that the default alignment for captions of images in pages and articles is centered. How can I make it left aligned?

    Thanks

    Kind regards

    Giuseppe

  •  295
    Paul replied

    Hello Giuseppe!

    You can change that with custom CSS. Please try applying this code:

    .image-caption, 
    .fancybox-title, 
    .wp-caption-text,
    .gallery-item .gallery-caption {
        padding-left: 0;
        text-align: left;
    }
    

    I hope it helps!

    Regards,
    Paul

  •  3
    gfaniz replied

    Dear Paul,

    Thanks for your attention.

    The code you suggested worked fine with the portfolios but not with the pages that continue to display with centered caption.

    Here's a link to a sample page:

    http://giuseppefanizza.info/46-2/

    How can I fix tis?

    An alternative option would work for me if I could use a portfolio as homepage. How can I do that?

    Thanks

    Kind regards

    Giuseppe

  •  3
    gfaniz replied

    Dear, 

    I solved by adding

    .wp-block-image {
        padding-left: 0;
        text-align: left;
    }
    .figcaption {
        padding-left: 0;
        text-align: left;
    }


    and changing the .figcaption attributes in

    http://giuseppefanizza.info/wp-includes/css/dist/block-library/style.min.css?ver=5.1

    I'm not sure if bot of this was necessary, but it worked.

    Please send me feedback/coments

    Thanks

    Regards

    Giuseppe


  •  295
    Paul replied

    I would recommend putting the custom CSS into the Additional CSS box (Appearance > Customize > Additional CSS) instead of the direct editing of the style.css file.wink.png