Fixing Image Size and Caption Issue in WordPress

I was having trouble with caption text longer than image width in Socrates Theme when working on one of my niche site today. I fixed this problem previously by tinkering the style.css file but when I upgraded the theme version, I completely forgotten to change it. It didn’t hit me until tonight when I was trying to post smaller photos with longer text and realize that the longer caption text ‘overlapped’ each other. I just couldn’t recall what I had done previously to fix that problem and have been trying to find  a solution on the net but couldn’t find one …maybe I’m not looking hard enough…

Overlappping occurs when the caption text is longer than the image width

Overlappping occurs when the caption text is longer than the image width

What did I do to fix the crammed and long text issue?

After some trial and error, I finally figured out that I need to change the wp-caption portion inside the css file. I’m not a techie so it took me quite some time to figure it out. Finally, it works and here is how it looks like after I change the line height from 3px to 10px.

Affter changing the line height

Affter changing the line height

Looks much better isn’t it?

I decided to make a post so that I can refer to it if if I have similar issue in the future. If you have similar issue, you don’t necessarily need to change it to 10px though. You can play with it and change it whatever fits your need. Having said that, before you decide to change anything, create a backup copy of your theme or files that you want to change. Should you do something wrong, then you can always load it back.

Here is where I changed it:

Caption code inside css stylesheet

Caption code inside css stylesheet

You can easily access it from the css stylesheet. Hope it help :)

Mindset

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace
  • MySpace

Post to Twitter

Related posts:

  1. Dan Raine WordPress Silo and RSS Bomber Plugin What I Like About Them Wordpress Silo and RSS Bomber Plugin Very Useful Wordpress Plugin...



Leave a Reply

Security Code: