• What would be the css code to make photo captions (a) reside closer to the photo, and eliminate the odd indent of the next paragraph and (b) left align the photo credit caption like photos caption are supposed to be in journalism?

    Also, unrelated but on the same page, it looks like the text paragraphs are unnecessarily narrow with very wide empty pace on either side. Is that something built into the Twenty-Twentyone theme? And is there some way to make text paragraphs wider?

    That look seems appropriate for a blog that is using sidebars. But it is a terrible waste of space when it comes to text pages.

    • This topic was modified 3 years, 1 month ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Add to the customizer’s Additional CSS section:

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

    Reducing the caption bottom margin fixes the weird indent on the linked page, but it can still happen randomly, depending on the size of the image and the adjacent text line spacing. Reducing the bottom margin can sometimes cause the text below to appear too close to the caption text.

    From a graphic design perspective, empty space is not necessarily wasted space ?? But you should be able to get the look you want. The ‘twenty_twenty_one_content_width’ filter can be used to alter the standard content width of the site. Custom filter hook code should be placed in a child theme or custom plugin. Or you might try one of the code snippet plugins. Code similar to:

    //set content width to 1024px wide (default 750px)
    add_filter('twenty_twenty_one_content_width', function() { return 1024; });
Viewing 1 replies (of 1 total)
  • The topic ‘photo caption causing enormous indent under it’ is closed to new replies.