• Home
  • About John P.
  • Contact
  • Terms

One Man's Blog

Specialization is for Insects.

  • 10 Best
  • Art
  • Computing
  • Fun Stuff
  • Gadgets
  • Videos
  • Photography
  • Travel
  • Tutorials
  • Health & Fitness
  • Politics
  • Thoughts
  • Food
  • Reviews
  • 10 Best
  • Art
  • Computing
  • Fun Stuff
  • Gadgets
  • Videos
  • Photography
  • Travel
  • Tutorials
  • Health & Fitness
  • Politics
  • Thoughts
  • Food
  • Reviews
Home / Tutorials / Fixing Image Alignment in WordPress 2.5 +

Fixing Image Alignment in WordPress 2.5 +

John P.

September 13, 2008 By John P.

If you are using WordPress with the built in image uploader, and the image align characteristics are not working for you, the fix is a simple modification to your theme’s Stylesheet.css file.

In the Admin control panel just navigate to Design | Theme Editor and over on the right side of the list of files select your Stylesheet to edit. It will usually say: Stylesheet (style.css)

Add the following lines anywhere you want within the stylesheet and then save the document and you should be good to go.

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}

If your Stylesheet is not editable, you may have to use your FTP client to go in and change the permissions on the files.

Related

Filed Under: Tutorials, Wordpress Tagged With: Rapid-Access, Themes, Tutorials, Wordpress

About John P.

John P. is a former CEO, former TV Show Host, and the Founder and Wizard behind Texas Metal Works. You can find him on Twitter, Facebook and LinkedIn. Feel free to send shoutouts, insults, and praise. Or Money. Money is good.

Comments

  1. al says

    August 9, 2013 at 3:52 pm

    That’s it! Have been struggling with this for a week. You made my day. The site looks much better. So grateful.Ta
    A S Camara

  2. Soumen says

    August 18, 2012 at 4:38 am

    Ah it worked perfectly. Thanks much for the help this bug was troubling me for almost a week now.

  3. fas says

    July 14, 2009 at 3:49 pm

    Thanks for the info. I was having some problems getting a few images aligned and didn’t know what was wrong. I spent hours tring to figure it out then I found this post and that solved the problem.

    Frank A. Smith

John P’s Tweets

Tweets by johnpoz

Read Over 2,500,000 Times

  • How I'd Hack Your Weak Passwords
  • Amusing Little Helicopter Game
  • A Compendium of 150 Monty Python Sketches
  • 10 Worst Drivers Ever Caught On Video
  • Get Your Virtual Haircut and Other Auditory Illusions
  • How Crack Cocaine is Made

Copyright © 2023 · Local Media on Genesis Framework · WordPress · Log in

 

Loading Comments...