• Resolved mkgago

    (@mkgago)


    I’m having trouble wrapping text around an image in the body of a post. A previous topic in this forum recommended this site https://www.tamba2.org.uk/wordpress/graphicalcss/align/index.html for that issue. I’ve tried to do what that page says (even though, honestly, some of the things on that page–like pasting things twice into the css doc–don’t make any sense to me), to no avail.

    My site is https://www.tatteredcoat.com , and the post I’m having a problem with is the top one–“Shooting the Moon.”

    Here is what’s in the style sheet:

    .img-shadow1 {
    clear: both;
    float:right;
    background: url(images/shadowAlpha.png) no-repeat bottom right !important;
    background: url(images/shadow.gif) no-repeat bottom right;
    margin: 20px 0 0 17px !important;
    margin: 20px 0 0 8px;
    }

    .img-shadow1 img {
    display: block;
    position: relative;
    background-color: #fff;
    border: 1px solid #a9a9a9;
    margin: -6px 6px 6px -6px;
    padding: 4px;
    }
    div.clearer {
    clear: left;
    line-height: 0;
    height: 0;
    }

    And here is the code from the message itself:

    <div class=”img-shadow1″>
    <img src=”URL” align=”right”>
    </div>
    <div class=”clearer”> </div>

    What am I doing wrong? How can I get the text to wrap around the image?

    Thanks in advance for your help.

Viewing 2 replies - 31 through 32 (of 32 total)
  • You are mixing inline style and stylesheet. You either use the classes defined in your stylesheet or mess around with inline stuff. Don’t use both of them.
    If you have inline style, that overrides the stylesheet.

    I have fixed my problem…. i needed to include these in my image CSS

    .rightimage
    {float: right;
    margin: 5px 5px 0 10px;
    border: 1px;
    padding: 5px;
    position: relative;
    display: inline;}
    It was the position: relative and display: inline that fixed it. I tried several different methods of fixing this for 2 days…but this did it. I hope this helps others. Thank you Moshu for your assistance.

Viewing 2 replies - 31 through 32 (of 32 total)
  • The topic ‘Wrapping Text Around an Image’ is closed to new replies.