Lunarpages Internet Solutions Blog
  • Home
  • About Us
  • LunarForums
  • Free Web Tools
  • LunarMods
0

Fixing WordPress CSS Alignment Editor Issues

22 December, 2009 - Design, Mitch Keeler

WordPress is finally providing a blog text editor that they can be proud of.  As of the most recent release, I have switched from using a desktop client to write blog entries to the WordPress web site interface.  That isn’t to say it hasn’t been without problems.

One issue I saw was that the text and picture alignment (left, right, and center) was not working.   However, this is a very simple thing to fix, if you aren’t afraid to get your hands dirty with some stylesheet work.

The problem is that the WordPress post and page editor uses its own CSS code to change how your page or post gets presented.  So if it is not in place already, copy this snipit of code into each of your WordPress themes to fix your alignment problems.

Here is the code you’ll want to copy and paste into your theme’s stylesheet:

img.centered, .aligncenter, div.aligncenter {display: block; margin-left: auto; margin-right: auto; }

img.alignright { padding: 4px; margin: 0 0 4px 5px; display: inline; }

img.alignleft { padding: 4px; margin: 0 5px 4px 0; display: inline; }

.alignright { float: right; }

.alignleft { float: left; }

Feel free to edit that as needed, to fit your own design preferences. Your theme is found at:

/wp-content/themes/nameoftheme/stylesheet.css

That should get you basically to the right spot.  Depending on the theme, stylesheet name might change. Also “nameofthetheme” should reflect the name of the WordPress theme you are using.

If you are having a hard time getting your images and content to align as you have specified in the built-in WordPress editor, this should do the trick.  Just remember to upload the changes, once you have put them in place.

Archives

Categories

View more:

  • About the Lunarpages blog
  • Best Blog Hosting Guide
  • BOTW.org 40% Discount
  • Contact Lunarpages
  • Free Online Tools
  • Free Webmaster Downloads
  • Free Wordpress Themes

Best Web Hosting

Lunarpages.com Web Hosting

Recent Posts

  • Enjoy Backup and File Sync with Sync TOGO
  • JugnooMe: Making Your Business Social Is Our Business
  • An Explanation of HTML5 for Beginners
  • How to Ensure Your Website is Optimized for Top Speed
  • Tips Every Webmaster Should Keep in Mind to Improve On-Page SEO

Recent Comments

  • jocuri kizi on Affiliate Marketing – Part 1 – Why the heck are you not doing this?
  • Kurt on Choosing the Best Ecommerce Shopping Cart
  • Vmelissap123 on Are You Smarter than a 5th Grader?
  • Brennan Scurlock | Review of top 10 web hosting providers. on Site of the Month – Team Brennan
  • iyinet on 10 Best Bookmark and Share WordPress Plugins

@Lunarpages Feed

Who We Are

  • Web Hosting Services
  • About us
  • Partners
  • Affiliate Program
  • Specials
  • 24/7/365 Support Desk
  • Community Forum
  • WIKI

Our Products

  • Colocation Services
  • Fully Managed Services
  • Dedicated Hosting
  • VPS Hosting
  • Microsoft Exchange
  • Open-Xchange
  • Fax To Email
  • Linux Hosting
  • Windows Hosting
  • Reseller Hosting
  • Quicksite Website Builder
  • SEO & SEM Services
  • Payment Processing
  • SecureLive Website Security
  • Tremendesk - Help Desk Solution

Connect With Us

Stay in touch with us!

Sign up for our monthly newsletter to receive updates, news, and current promotions!

Twitter
Facebook Google+ RSS Feed


© 2000 - 2011 Add2Net, Inc. "Lunarpages", "Add2Net" and the "Lunar Symbol" are the trademarks or the Registered trademarks of Add2Net, Inc.
All rights reserved. Unauthorized use is prohibited.