If you’ve already upgraded to WordPress 2.6, you might have noticed that WordPress handles images a little differently than the WordPress 2.5 branch and below. The main change is that you can now use the alt field to add a caption, which will wrap a sort of caption below the image.
The problem I’ve had with this new setup is that it can cause some problems when trying to float your images due to the new class=”alignleft”, class=”alignright” or class=”aligncentered” elements. The image will still move, but I’ve found the text won’t wrap properly around the image.
Thanks to a recent post from Sadish over at WP Lover, it looks like this problem can easily be fixed by by adding some code anywhere into your CSS stylesheet:
img.alignleft, div.alignleft {
float:left;
margin:0 0.5em 0.5em 0;
}
img.alignright, div.alignright {
float:right;
margin:0 0 0.5em 0.5em;
}
img.aligncenter, div.aligncenter {
text-align:center;
margin:0 auto;
}
This way the images should float and the text should wrap properly. Thanks for posting the easy fix Sadish!














There Are 38 Responses So Far »
Pingback: Internet Marketing Blog Posts in Review from Marketing Masters Guide | Marketing Masters Guide
Pingback: BlogBuzz July 26, 2008 | Webmaster-Source
Pingback: Cadulicious: ícones gratuitos, dicas de Wordpress, portfolio online e muito mais! | Cadu de Castro Alves
Pingback: john keegan dot org » links for 2008-07-28
Pingback: Corregir error de alinear imágenes en WordPress 2.6 - Carrero Bitácora de los Hermanos Carrero, David Carrero Fernández-Baillo y Jaime Carrero Fernández-Baillo.
Pingback: Planeta WordPress » Corregir error de alinear imágenes en WordPress 2.6
Pingback: Image Wrap Løsning til Wordpress 2.6
Pingback: Problemas con la alineación de las imágenes en Wordpress 2.6 | Proyecto Aurora
Pingback: Dicas Wordpress - Alinhamento de Imagens em Posts Wordpress 2.6 - Wordpressbr.com
Pingback: Links for 29-07-2008 | Velcro City Tourist Board
Pingback: Floating Image Change For Wordpress 2.6
Pingback: Handle Images Easily with a Quick CSS Update : ultimate geek girl
Pingback: WordPress Wednesday News: WordPress iPhone Upgraded, WordCamp San Francisco Registration, Simon Dickson Rocked the UK, WordPress Theme Directory, and 201,000 Blogs Using WordPress 2.6 : The Blog Herald
Pingback: WordPress Wednesday News: WordPress iPhone Upgraded, WordCamp San Francisco Registration, Simon Dickson Rocked the UK, WordPress Theme Directory, and 201,000 Blogs Using WordPress 2.6 | The Blog Herald
Pingback: WordPress News For The Week Of August 1st 2008 » The NMP Network
Pingback: Individualized Counseling » Blog Archive » McDragon on “Align images right/left suddenly not working after upgrading to WP 2.6″
Pingback: Wordpress 2.6 - Images won’t align properly | eJabs