Image will not align right

Community Forums Forums Design Tips and Tricks Image will not align right

This topic is: resolved

This topic contains 7 replies, has 2 voices, and was last updated by  cehwitham 1 year, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #18727

    greenecon
    Participant
    Post count: 24

    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.

    #21033

    cehwitham
    Participant
    Post count: 396

    On 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

    #21936

    greenecon
    Participant
    Post count: 24

    Did 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;
    }

    #21940

    cehwitham
    Participant
    Post count: 396

    Adding back in the following would sort out the homepage:

    .home .entry-content img {
    float: left;
    padding-right: 20px;
    }


    Twitter: cehwitham Web: cehwitham.com

    #22052

    greenecon
    Participant
    Post count: 24

    You are becoming my hero. Will try this.  Tana

    #22054

    cehwitham
    Participant
    Post count: 396

    Glad it’s going well.


    Twitter: cehwitham Web: cehwitham.com

    #22057

    greenecon
    Participant
    Post count: 24

    IT WORKED IT WORKED IT WORKED!  Jump, jump, shout, jump, shout, jump, jump.

    #22058

    cehwitham
    Participant
    Post count: 396

    Awesome!


    Twitter: cehwitham Web: cehwitham.com

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.