• Resolved n0ah

    (@n0ah)


    I have searched the CSS and can’t figure out why the figcaption or wp-caption-text is not being centered underneath the image.

    https://www.whatsnoahdoing.com/how-to-get-a-job-teaching-english-in-south-korea/

    If you check that post I have one image at the top, with a caption directly underneath it. Nothing I have tried has affected the caption at all. I googled quite a bit and a lot of posts mention to copy some CSS code into the stylesheet because it simply wasn’t there, but I just can’t seem to get anything to change.

    Can anyone offer me any help or advice?

Viewing 8 replies - 1 through 8 (of 8 total)
  • MarkRH

    (@markrh)

    Uhh.. edit your theme’s style.css and add this:

    .wp-caption-text {
    	text-align: center;
    }

    Currently, there’s no CSS telling it to center. Adding text-align: center; to the style should do it.

    Thread Starter n0ah

    (@n0ah)

    That’s already in the CSS though:

    .wp-caption-text {
    	color: #707070;
    	color: rgba(51, 51, 51, 0.7);
    	font-family: "Noto Sans", sans-serif;
    	font-size: 12px;
    	font-size: 1.2rem;
    	line-height: 1.5;
    	padding: 0.5em 0;
    	text-align: center;
    	display: table;
    	margin: 10px auto;
    }
    MarkRH

    (@markrh)

    If you look at this screenshot: https://i.imgur.com/25df935.png

    That CSS is not there. Looks like you’re using something that combines the CSS. It’s possible that this is not reflecting the change you made and you need to recombine it or temporarily disable it.

    Thread Starter n0ah

    (@n0ah)

    That’s strange. When I inspect the element I can alter the CSS to put in the text-align attribute, and it actually shows the caption being centered. But when I make that change the CSS file and update it, nothing happens.

    I don’t even know where to start looking. (I’m fairly new to HTML and CSS).

    Michael

    (@alchymyth)

    could be a problem with your ‘minify’ plugin (which also makes helping with the troubleshooting more complicated).
    temporarily try to run your site without the ‘minify’.

    in what CSS file do you see the ‘center’ code?

    Thread Starter n0ah

    (@n0ah)

    Hm, I played around with the Minify settings, and it seems to be working now that I have unchecked “Rewrite URL Structure”. I don’t quite understand why though.

    I saw the code in the style.css file.

    https://www.whatsnoahdoing.com/how-to-get-a-job-teaching-english-in-south-korea/

    Just to double check, is that top caption centered?

    Michael

    (@alchymyth)

    all seems to be ok now – the caption looks centered to me.

    Thread Starter n0ah

    (@n0ah)

    Cool. Thanks for the help! I’ll have to dig a little deeper to figure out why that happened, but for the time being everything is working. ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘I can't figure out how to center an image caption in the Twenty Fifteen theme.’ is closed to new replies.