Home > Tips and Tricks > Wordpress 2.6 Caption Alignment Fix

Wordpress 2.6 Caption Alignment Fix

January 18th, 2009

Anyone who is using the new version of Wordpress might appreciate this!  There is some issues with the new “captions” feature for images.  I found a great fix here which I am simply reposting below.

Paste this to the bottom of your style.css.  Worked like a charm for me!

/* Captions */
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}

.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-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;
}
/* End captions */

John Tips and Tricks