Image Align & Text Wrap

WordPress 2.5 introduced a convenience feature for inserting images and wrapping text around posts. The feature appears when you click on the ‘Add an Image’ icon on the Add media toolbar. Unfortunately, not all themes support this feature, but adding it to your own theme is a snap as they are simply CSS rules that can defined inside of style.css.

CSS Code

You can easily find these CSS definitions needed to support WordPress 2.5’s convenience features. Just open the style.css file from the default ‘Kubirck’ theme that comes with WordPress 2.5 and above. Its NOT included in the Classic theme, but could just as easily be added.

The CSS rules are defined in img.centered, img.alignright, img.alignleft, .alignright, and .alignleft. You can simply copy and paste these definitions into your own style.css. By doing so, you will have instantly updated your theme for WordPress 2.5 compatibility, increased value to your theme, and made posting a whole lot easier for your end users.

 

 

 

Testing this functionality is even easier by using the nearly identical icons located on the ThemeDreamer toolbar. Simply click the image button to ensure the an image is being shown in your simulated post, and then select an alignment mode (one of the red block icons next to the image button on the toolbar). ThemeDreamer will automatically simulate an image post with the given alignment inside of Dreamweaver’s Design View. This is the equivalent of a user selecting one of the alignment option circles in Add an Image dialog in WordPress.

Image Alignment

The image alignment buttons in ThemeDreamer’s toolbar that resides inside Dreamweaver correspond with the options in WordPress’s Add an Image dialog. Use them to test your theme in Design View.
Version .3 Toolbar

 


2 Responses

  1. Bookmarks about Image Says:

    [...] – bookmarked by 6 members originally found by garradini on 2008-12-03 Image Align & Text Wrap http://www.themedreamer.com/howto/image-align-and-text-wrap – bookmarked by 5 members originally [...]

  2. jconroy Says:

    You guys are the best…you got back to me within minutes and solved the problem! I am impressed with your customer service and product.

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.