[Resolved] Grid block images – caption

Home Forums Support [Resolved] Grid block images – caption

Home Forums Support Grid block images – caption

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

    Hi Support,

    I added a grid with 5 blocks, in each block there’s a photo with a caption.
    The caption is now below the image, I would like to display it on the image (at the bottom, a bit like on the gutenberg gallery).

    Thanks.

    #2048957
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    .wp-block-image {
        position: relative;
    }
    .wp-block-image figcaption {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        margin-bottom: 0;
        padding: 5px;
        text-align: center;
        background: rgba(255,255,255,0.5);    
        color: #000;
    }
    #2048993
    Petri

    That works great, thank you!

    #2049033
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.