Shop Categories

X

Caption text css

Home Forums Agama Pro Caption text css

Topic Resolution: Resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10125
    nmarsh
    Participant

    Hi there

    I’m trying to create menu pages on our site, with a picture ‘button’ and a caption underneath giving details of the linked page name.

    This seems to work as long as the caption is not too long – if the text goes to two lines then the buttons on the row below go out of sync.

    I’ve tried amending the css for the caption text to try and increase the padding but this doesn’t seem to work for me. Any ideas how I can tweak this to keep all the buttons in line?

    Thanks!

    .wp-caption {
    max-width: 100%; /* Keep wide captions from overflowing their container. */
    padding: 5px;
    }
    .wp-caption .wp-caption-text,
    .gallery-caption,
    .entry-caption {
    font-style: italic;
    font-size: 14px;
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.5;
    color: #757575;
    }

    #10126
    Zex
    Moderator

    Hello,nmarsh!

    Try to add an “!important” attribute to your padding value:

    .wp-caption {
    max-width: 100%; /* Keep wide captions from overflowing their container. */
    padding: 5px!important;
    }

    or try to limit the height of the wp-caption:

    .wp-caption {
    max-width: 100%; /* Keep wide captions from overflowing their container. */
    height:200px!important;
    }

    Regards

    #10127
    nmarsh
    Participant

    Perfect, that did the trick! I’m learning a lot this week 🙂

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