Posted on 11th April 2008No Responses
WordPress Coding Tips: Alignment around Images

In WordPress, you’ll need to find an alternative to the usual hspace and vspace tags.

Here’s a great suggestion from the WordPress Codex. In the stylesheet, paste this:

img.left { padding: 4px; margin: 0 7px 2px 0; display: inline; }



And in your markup code in whichever file you’re editing, e.g. About, in my case, code it like this:

<img src=http://www.whereveryourpicis.com/pic.gif class=left>



Tweak the padding and margins till they align nicely. And you’re done!

Comments
Leave a Response
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>