• Resolved Mistress Mia

    (@mistress-mia)


    Hi,

    My website is https://www.kinkymia.com

    I am trying to change the wp-caption and although I have successfully changed this on other themes using the following CSS code:

    .wp-caption {
    font-size: 14px;
    color: #ffffff;
    text-align: center;
    background-color: #cccccc;
    padding-top: 8px;
    margin: 10px;
    }

    The font size and colour does not appear to change here.

    Can you assist please?

    Mia

Viewing 15 replies - 1 through 15 (of 18 total)
  • Which caption do you want to change?

    Thread Starter Mistress Mia

    (@mistress-mia)

    Image captions

    ??
    Yeah but point me somewhere, I can’t see image captions here: https://kinkymia.com/kotw-dildos/
    that “<p style=”text-align: center;”>Posted in association with Kink of the Week</p>” is not a caption…

    Thread Starter Mistress Mia

    (@mistress-mia)

    Look at “Pinched” that has a caption

    Thread Starter Mistress Mia

    (@mistress-mia)

    Ok then use
    .wp-caption .wp-caption-text instead of .wp-caption to apply a rule with higher weight.
    That should work

    Thread Starter Mistress Mia

    (@mistress-mia)

    It didn’t work

    If I do this:

    .wp-caption-text {
    font-size: 14px;
    color: #ffffff;
    text-align: center;
    background-color: #cccccc;
    padding-top: 8px;
    margin: 10px;
    }

    it removes the entire border and leaves the text exactly as it was with only the #cccccc background colour

    If I do this:

    .wp-caption-text {
    font-size: 14px;
    color: #ffffff;
    }

    .wp-caption {
    text-align: center;
    background-color: #cccccc;
    padding-top: 8px;
    margin: 10px;
    }

    All remains as it did originally.

    Any other ideas? ??

    Wait I said
    .wp-caption .wp-caption-text
    You should use both, so :

    .wp-caption .wp-caption-text{
    text-align: center;
    background-color: #cccccc;
    padding-top: 8px;
    margin: 10px;
    }
    Thread Starter Mistress Mia

    (@mistress-mia)

    If removed what I have and I insert as you suggest above still not working – take a look

    I completely lose the border, no change to text colour to #ffffff and size has not increased I was looking at 14px for text size

    https://kinkymia.com/pinched/

    I am inserting the css via “Appearance” – “Edit CSS” from the WP Dashboard.

    Hey but.. I just copied your last code in the right way, clearly if you want to change the font size and color you should put those inside the brackets. So back to your first code. The right way to use it is:

    .wp-caption .wp-caption-text {
    font-size: 14px;
    color: #ffffff;
    text-align: center;
    background-color: #cccccc;
    padding-top: 8px;
    margin: 10px;
    }

    And about the border, you lost it for something else you did. This code will not affect what you call.. the border. Which is, actually, the background of the div .wp-caption . ??

    Thread Starter Mistress Mia

    (@mistress-mia)

    Excellent we are there!!

    I’ve tweeked the padding a bit to get the image central to the caption but otherwise the above worked perfectly!

    Thank you so much for your help!

    Mia ??

    Thread Starter Mistress Mia

    (@mistress-mia)

    I added this to get the background right and tweek the padding

    .wp-caption {
    background-color: #e3e3e3;
    padding-top: 12px;
    padding-left: 12px;
    margin: 10px;
    }

    Thread Starter Mistress Mia

    (@mistress-mia)

    In case anyone looks at this, below is the full coding that is now in my CSS to cover what it was that I wanted to achieve.

    I ended up changing the colours around a bit from my original enquiry to make it look right.

    .wp-caption.aligncenter {
    margin-left: auto;
    margin-right: auto;
    }

    .wp-caption .wp-caption-text {
    font-size: 14px;
    color: #525252;
    text-align: center;
    background-color: #e3e3e3;
    }

    .wp-caption {
    background-color: #e3e3e3;
    padding-top: 12px;
    padding-left: 12px;
    margin: 10px;
    }

    You mean about the image not centered in the div?
    You could add the class aligncenter to the image, and avoid that padding-left. But.. ok, you’re on the right track ??

    Consider that I hate this part but…
    Would you mind marking also this topic as resolved?
    Thank you!

    Thread Starter Mistress Mia

    (@mistress-mia)

    Ah ok would that be with the following:-

    .image.aligncenter {margin-left: auto;
    margin-right: auto;}

    similar to the wp.caption?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Change Font and Font Size in Captions’ is closed to new replies.