So I have finally updated my blog to Wordpress 2.6 and I wanted to try its new features. Just before this new release, I was looking for a plugin that can caption images. It’s a pretty neat feature of wordpress 2.6. So I went ahead and tried. What happened was that there was no style. It didn’t look good. I went ahead and took a look at my page’s source and tried to edit CSS but it didn’t work.
But yesterday, I found this codex article at wordpress dot org. It has fixed the problem. Here is the code block that you need to in order for it to work with style;
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
/* optional rounded corners for browsers that support it */
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
Of course you can edit this as you want to fit to your custom wordpress theme. I have changed couple of things and here is how it looks;

This is a picture I took in St. Petersburg in Russia.
How to get wp-caption working in Wordpress 2.6


If you like this post and wish to receive updates for future posts, you can
Recent Posts
Categories
Excellent post. good luck.
Thanks for the post. Finally got it working.
thanks! just what i was looking for!
copy - paste and it works!
[...] tenth blog already posted some cool CSS code to add to your theme’s stylesheet to make this [...]