Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #632223

    WordPress’s default style for images+captions added to Posts and Pages by using Add Media to a Text Block within the WYSIWYG editor features the caption below the image and a visible border around the image+caption unit. I wanted to get rid of the visible border. I got rid of it by using the CSS code from Ismael in this post:
    https://kriesi.at/support/topic/removing-the-border-around-images-with-captions-posted-in-a-page/

    div .wp-caption {
    border: none;
    }

    But now that there’s no border, the text wrapping around the image+caption on the bottom butts vertically right up against the caption text. I’d like to add some vertical space between the body text and the caption text. I tried using the Advanced Image Styles plugin, but it’s reading only the image, not image+caption – so when I add a bottom margin, it pushes the caption text away from the image.

    Is there a nice Quick CSS code to solve this problem?

    #632685

    Hi missouriartscouncil,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Thanks,
    Rikard

    #639464

    Sorry this took so long! Here is the example – in the first color section, the photo of the four glass vases. I added 50px of bottom margin to exaggerate the demonstration of the problem. In my initial query I asked only about bottom margin, but what I want is to be able to add either vertical or horizontal space between an entire image+caption unit and the wrapping text.

    BTW, I added the images in the Honorees and Artists color sections using Enfold’s Avia Layout Builder – 2/3-1/3 columns with the images in the 1/3 column on the right. A much cleaner result! I love ALB. But sometimes I still need to be able to add images within WordPress’s own WYSIWYG editor.

    #639554

    Got it! This is how I solved the problem:

    #top .wp-caption.alignright { margin: 50px 0 50px 50px; }

    For the images with no captions, I can adjust the distance between the image and the wrapping text with Advanced Image Styles.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Add space around image+caption in WYSIWYG once border has been eliminated?’ is closed to new replies.