Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Gap Between Photographs

Discussion in 'Misc WordPress Requests' started by paulwpxp, Dec 4, 2017.

  1. paulwpxp


    Reply To: Gap Between Photographs, by paulwpxp

    Problem is they are all float elements. A caption text that’s too long so it wrapped into 2 lines, this causes the first image in the following raw can not float all the way to the left.

    Try edit this caption text “Montana Country Sunset (2)” to something shorter like “Sunset (2)” and you will see that the image with “Just over the Hill” caption will now float all the way to the left.

    Quick fix is to add max-height to the caption text (I’m using Chrome and found that the value of 20px or lower fixes the issue).

    .wp-caption-text {
    max-height: 20px;
    margin-bottom: 5px;
    font-size: 10px;

    Please note, only the max-height fixes the issue, the margin-bottom and font-size is optional adjustment so everything spacing out better.

    So that’s the quick fix to the problem asked, but the right way (or more standard way) to display images like this is to use WP native gallery funtion.


    I usually upload images directly via post (so they are all attached to that post), not via Media upload (images not attach to the post). With all images attached to post, I will just put a simple shortcode like this [gallery columns="4"], and that’s it, WP does the rest.

    Reply To: Gap Between Photographs

Share This Page

Monarch Social Sharing Plugin