wordpress: wrapping text around images

for the more current wordpress versions (2.1.x and above), the align commands in the built-in rich text editor don’t work too well. so text will not wrap around your images (without some tweaking). arghhhh!

these changes are made under the assumption that your current theme is a little dated.

formatting is controlled in the main stylesheet under img.styles:

img.alignright {float:right;}
img.alignleft {float:left;}

such a simple yet annoying fix.

vspace and hspace don’t work either (nothing does, it seems) so open up that stylesheet and add this on to the previous block:

img.alignright {float:right; margin:0 0 1em 1em;}
img.alignleft {float:left; margin:0 1em 1em 0;}
img.aligncenter,.aligncenter {display: block; margin:1em auto; text-align:center;}

there is a class for centralised text, but since there isn’t an issue with text wrapping, there’s no need to touch it.

if it ain’t broke, don’t fucking fix it, yo.

Tags: , ,

Leave a Reply