WordPress – Text Won’t Wrap Around Images

February 3, 2011 by  
Filed under Design, Fix-It Tips

Don’t kill your computer! It is an easy fix. You just need to make sure you do 2 things.

Don’t kill your computer! It is an easy fix.

First, make sure that you have the left or right alignment bubble clicked when you add the image. If you are not sure, go into your visual editor, click once on the image. You will see 2 boxes appear, on is edit, and one is delete. Click the edit and look for the alignment section.

Second, make sure this code is in your style.css file. I am constantly amazed to see themes that do not have this basic code in it. If you want to see if your theme has it, go to your wp admin menu on the left, click appearance/Editor. The first file that comes up is the one you want. Scroll down and look for it. If you don’t see it, paste it in there and hit save.

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

Now that is a happy duck!!!

Thanks for reading!