How to Align Images in a WordPress Blog - dummies

How to Align Images in a WordPress Blog

By Lisa Sabin-Wilson

When you upload your image, you can set the alignment for your image as None, Left, Center, or Right. The WordPress theme you’re using, however, may not have these alignment styles in its stylesheet. If you set the alignment to Left, for example, but the image on your blog doesn’t appear to be aligned at all, you may need to add a few styles to your theme’s stylesheet.

Here’s a quick an easy method:

  1. Click the Editor link in the Appearance menu.

    The Edit Themes page opens. All the template files for your active theme are listed on the right side of the page.

  2. Click the Stylesheet template.

    The Stylesheet (style.css) template opens in the text box on the left side of the page.

  3. Add your desired styles to the stylesheet.

Here are the styles you can add to your stylesheet to make sure that image-alignment styling is in your theme.

Image Alignment Add This to Your Stylesheet (style.css)
None img.alignnone {margin: 5px 0 5px
Left img.alignleft {float:left; margin: 5px 10px
5px 0px;}
Center img.aligncenter {display:block margin: 5px
Right img.alignright {float:right; margin: 5px 0
5px 10px;}

These styles are just examples of what you can do. Get creative with your own styling.