Some of you may be having issues with images in posts using the new WordPress 2.5 image upload. If you find that your theme isn’t placing the images correctly you will want to take a look at your current themes style.css file to make sure the alignment rules have been written.
Note: Always, always and yes .. always make a backup before you go messing with things.
Admin > Design > Theme Editor > Current Theme > style.css
You will want to look for the following or something similar:
.alignleft {
float:left;
padding: 4px;
}
.alignright {
float:right;
padding: 4px;
}
.aligncenter {
float:center;
padding: 4px;
}
If these css rules (alignleft, alignright, aligncenter) are not currently in your style.css file simple copy and paste them in at the bottom. You can make changes if you would like; add a border etc.
If you liked the above post, why not buy a round of coffee :)Tags: wordpress, wordpress 2.5, wordpress 2.5 themes, wordpress help, WordPress Themes
Suggested Reading
Christmas Gifts
Buy Amazing Christmas Gifts on Walmart for your family [..]
US Colleges
Choose the right college with our site. Check some [..]
April 18th, 2008 at 12:54 am
Hey Jill Do you know why when I post an image in 2.5 it pushes my text over to the right? Here is my page http://bostonredsoxchat.com
April 18th, 2008 at 12:55 am
Oops sorry I meant MissDanni
April 18th, 2008 at 8:05 am
@ Dan
Looking at your site I don’t see any posts that display what you mention.
However you can control how images are displayed in the image upload when you make a post. Simply check the radio button beside your choice, none, left, right, ect.
If you don’t want your images to align to one side and text to the other simply check none on the image unloader alignment selection.
April 25th, 2008 at 6:48 am
Hi … I’m running into this stubborn problem with image alignment on WP 2.5. I put the codes you suggested at end of style.css but it didn’t do a thing. Even tried to add “img” in “.alignleft … {” still didn’t change alignment. Would you please take a look at this site to see if I’ve done something stupid? Thanks!
http://sj2.org/pauly-nguyen/
BTW I have another website (my blogsite) which I use the Misty Look theme and images seem to align fine on that theme!
April 25th, 2008 at 8:26 am
@Hung
Your css seems to be fine, the rules are there and should be working for you.
One thing to note, when you upload a photo and place it in the post, select the alignment from that screen, there are radio buttons for none, left, center and right. Now in the editor it will not look like it has aligned at all, but once you make your post you will see that it has.
Give it another try and let me know.
April 25th, 2008 at 7:50 pm
I tried all that and the picture stubbornly remains on the left. You can see from the “view-source” that the img statement has class designated as “alignright” and it still goes to the left. Switch it to “aligncenter” and it still goes to the left. And yes I chose these from that upload photo dialog box.
How did you look at my css file? I inserted your code, because I didn’t see that anywhere else in my css sheet. It is curious that I have no problem at another blog (http://hungpham.sj2.org). I use a different theme there though (Misty Look). I wonder if the theme I use here, after so much butchering, is messing up how Wordpress align images.
If you can offer some help I’d really appreciate it. THANKS!
April 25th, 2008 at 8:06 pm
@Hung
That is interesting.
Regrading your css I simply view your page source, collect your css url and load it in my browser.
Are you by chance using a cache plugin?
This could very well be a theme issue, the best way to find out is to switch your theme to the wordpress default theme and see if it changes anything.
April 25th, 2008 at 8:49 pm
Hi MissDanni - thanks for the prompt response and thanks for the tip to read css url. No I don’t use a cache plugin. Probably has to do with my theme. I’ll have to take time looking into it
Thanks again!