photo cpations: changing default from left-justify to center

  • Unknown's avatar

    Hello. I use Vigilance, which by default left-justifies all photo captions. Does anyone know if there’s a way through CSS to change that default? I want all my captions to be centered by default. Can anyone suggest lines of code to insert?

    (BTW, it doesn’t work just to manually center captions in each post, or to manually break them into multiple lines. I’ve discovered that those solutions screw up the code somehow, and the result is that the captions no longer break into two or more lines when they’re longer than the photo is wide. So you get a long caption on a single line, extending inches to the left or right of the photo. In fact, I learned on another forum that any meaningful change to photo captions can screw up the code, preventing breaking into multiple lines. That’s why I’m looking to change the default, without manual changes to each caption.)

    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Add this:

    .wp-caption p, .wp-caption dd {
    	text-align:center;
    }
  • Unknown's avatar

    Brilliant! Thank you, panaghiotisadam!

  • The topic ‘photo cpations: changing default from left-justify to center’ is closed to new replies.