NSpeaks

A Blog about Blogging and Wordpress.

Align Images in your Blog posts

If you find aligning images in your blog posts difficult and you can’t line up your text along side smaller logos or images, you should continue reading.

I will start the post with examples of poorly aligned and nicely aligned images in blog posts.

The following screenshot displays a poorly aligned image in a blog post.

Poorly Aligned Image in Blog post

See how the image wastes precious spaces by not allowing the text to align with the image. Now we observe a nicely aligned image in a blog post.

Nicely Aligned Image in Blog post

See the difference it creates? Plus it adds more to visual appeal of your blog. How to achieve this? Well its a simple edit in your theme’s stylesheet file.

NOTE: Make a backup of your theme’s style.css file before this incase some problem occur you can always revert back to old one.

Open your theme’s style.css file and add the following line at bottom of your css file:

Now whenever you want to post a small image which you want aligned with text in a post just add class=”right” or class=”left” in <img> tag while writing the post.This code should work on allmost all themes.

Related posts:

  1. Remove Border from smiley images in WordPress
  2. Optimising Page Title of a Blog
  3. Trick to get more Impressions on Image Ad Banners
  4. Get Threaded Comments on your Blog
  5. Are you prepared for Blog Tragedy – Backup Now?

12 Comments

  1. It did not work for me. Is the information to old?

  2. Wow.. after spending hours looking for a workaround … this is fantastic! Quick, easy and it works! Thanks!

  3. Thankyou, this worked perfectly.

  4. Your solution works great. Thanks

  5. Used this in my blog, but as you can see, although the first paragraph aligns nicely with the image, the second paragraph doesn’t, there’s too much white space… tried adding it onto the end of the first para but it didn’t ‘flow right’ to me…

  6. Hi,
    After an image has been aligned with the top left of a blog post, how can one align an additional image with the bottom right of the same blog post?
    Regards,
    dy

  7. Worked like a charm! I used it in my today’s post. Thank you!

  8. Worked perfectly. Thank you!

  9. Good information. A lot of themes already have a class for floating images, so if you can find it in your css file you may not have to create a new class. I think with the default Kubrick theme it is .alignright and .alignleft.

  10. Thanks Nspeaks! I always have to manually type in the html code everytime I want to align text. Now I want have to!