Captions Not Working Right in WordPress 2.7

Did your captions suddenly get a mind of their own when you upgraded to 2.7?

The existing images with captions will be fine. However, with the advent of 2.7 captioned images are now wrapped in a “div” tag. There are two lines of code you will need to add to your styles.css for images to once again behave themselves.

It seems to depend on a couple of things I haven’t isolated yet.   I don’t know if it is the browser you use to create the post, the theme you are using, or a change in how the WP Editor writes the code.

What I discovered when trying to place a caption image to the left in a post it was missing code to handle this since it was now wrapped in a div tag.   I added these lines to the CSS captioning section and all began to work again.

.alignleft {
float: left;
}

.alignright {
float: right;
}

Place these right under:

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

With this little addition they should behave themselves again.

This probably doesn’t have an impact on many bloggers.   I don’t see very many using the Caption feature.   It also seems to be rare to see an image in a post which isn’t centered.

What does this say about images and captions

If you want your blog to stand out from others   put images left and right with text along side and use captions.

Your blog won’t be the same as every other blog you read.   Yes, I know there is no image in this post.

Print Friendly

About Dave Smith

Did you know that with Twenty Ten if you fill in the User Biographical info field it will put an author window at the end of each post. Be sure to get your gravatar for all authors on your site. And fill out the Bio field in the profile.
This entry was posted in Real Estate Blogging, Single Listings and tagged , . Bookmark the permalink.

2 Responses to Captions Not Working Right in WordPress 2.7

  1. Dave Smith says:

    Testing anti spam plug-in

  2. Rob Saxe says:

    I’ve wanted to use captions for sometime but they never seemed to work right. I didn’t even have the */captions/* section in my stylesheet.
    Thanks
    Rob

    Rob Saxe ´s last blog post..Pulte Homes Sales Event This Weekend!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

5,125 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge