Community Forums › Forums › Design Tips and Tricks › Image will not align right
Tagged: alignment, generate, image align
This topic contains 7 replies, has 2 voices, and was last updated by cehwitham 2 months, 3 weeks ago.
-
AuthorPosts
-
February 7, 2013 at 2:08 pm #18727
http://www.thegreeneconomy.com: Generate
The image looks just fine in WordPress, but when I view on the web, it is always flush left, not right or center. I have tried all KINDS of things, but still, flush left. I saw a similar post, without an answer, but now I can’t find that post so am adding mine. I looked at wordpress.org, and they suggested I add the following to my CSS:
img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}img.alignright {
margin: 0 0 5px 10px;
display: inline;
}img.alignleft {
margin: 0 10px 5px 0;
display: inline;
}.alignright {
float: right;
}.alignleft {
float: left;
}I did, no luck. any ideas? It’s a real problem for a visual site like ours. It sstarted when we updated to WP 3.5x. It has NOT been a good experience.
February 18, 2013 at 11:20 am #21033On line 2840 of style.css you have;
.entry-content img {
float: left;
padding-right: 20px;
}This is over riding the .alignright style.
Either change line 1435 from .alignright to .entry-content .alignright or remove the float:left; property from line 2840.
Twitter: cehwitham Web: cehwitham.com
February 21, 2013 at 7:15 am #21936Did what you suggested, but it made the images on the home page and the category pages no longer wrap. Here’s what happened below.
/* atk 2-2013 Recommend we remove ‘float left’ but that messed with home page */
.entry-content img {
float: left;
padding-right: 20px;
max-width: 100%;
}.avatar,
.featuredpage img,
.featuredpost img,
/* removed ‘float left’ to hopefully let images go either way. messed with category pages ATK 2-20-13 */
.post-image {
float: left;
background-color: #fff;
border: 1px solid #ddd;
padding: 4px;
}February 21, 2013 at 7:24 am #21940Adding back in the following would sort out the homepage:
.home .entry-content img {
float: left;
padding-right: 20px;
}
Twitter: cehwitham Web: cehwitham.com
February 21, 2013 at 2:48 pm #22052You are becoming my hero. Will try this. Tana
February 21, 2013 at 2:54 pm #22054February 21, 2013 at 3:04 pm #22057IT WORKED IT WORKED IT WORKED! Jump, jump, shout, jump, shout, jump, jump.
February 21, 2013 at 3:11 pm #22058 -
AuthorPosts
You must be logged in to reply to this topic.