Correct WordPress AlignCenter CSS Code

Well, this time, I had to post this in my blog so I do not have to waste time scouring through blog posts and forums just to get this one right.

My blog recently got hacked so I had to install everything. That means default CSS templates as well and there is the issue of aligning images at the center.

Just make sure you add this CSS code and your aligncenter attribute value should be okay.

img.alignleft { float: left; }
 
img.alignright { float: right; }
 
img.aligncenter { display: block; margin: 0px auto 0px auto; }

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Related Posts Plugin for WordPress, Blogger...
  1. One Response to “Correct WordPress AlignCenter CSS Code”

  2. Thanks for this informational post. This post is really helpful for the WordPress Beginner.

    By WordPress Development Company on Aug 9, 2012

Post a Comment