Center caption of an image (Oxygen)
-
Hoping to get a bit of help in centering the captions of my images. They all seem to left-align whether I left-, centre- or right-align an image. Here’s a sample page:
http://nowwhatstheplan.com/2013/04/22/jordan-journals-day-3-ultimate-relaxation-at-the-dead-sea/
The blog I need help with is: (visible only to logged in users)
-
Thanks for including a link!
I checked out the images at https://en.forums.wordpress.com/topic/center-caption-of-an-image-oxygen?replies=1 and I found that most are not centered but are rather full-width with no alignment property applied. To target those and make the captions for them centered, you can add a CSS snippet like this to your Appearance → Themes → Customize → CSS panel:
.wp-caption.alignnone .wp-caption-text { text-align: center; }Note that this example will affect all images that don’t have any alignment slide but did you have a caption.
If you were to change the images to be centered, then you could replace this selector
.wp-caption.alignnone .wp-caption-textwith this one.wp-caption.aligncenter .wp-caption-textTry experimenting with those examples, and I think you’ll see how it works pretty quickly.
Your blog looks fantastic!
- The topic ‘Center caption of an image (Oxygen)’ is closed to new replies.