• Resolved altfg

    (@altfg)


    I can’t get the CSS to work for image margins. The wrap-around text is too close to the pictures on my site, whether to the left or to the right. (Also at the bottom.)

    This is what the CSS page says:

    #content .post
    {
    padding:0 0 2em 0;
    border-bottom:#ddd 1px dashed;
    }
    img.floatLeft {
    float: left;
    margin: 10px;
    }
    img.floatRight {
    float: right;
    margin: 10px;
    }
    #content .post h2
    {
    font-size: 1.4em;
    margin: 1em 0px 0px;
    letter-spacing:1px;
    font-weight:normal;
    }

    I’ve looked at other comments in the WordPress forum, and — unless I misunderstood them — what I have in the CSS page should be enough for the images to have a 10-pixel margin (left or right).

    But it’s not working…

    I generally use Dreamweaver 4.0 to create my posts.

    When I used the “hspace” and “vspace” in Dreamweaver just yesterday, Explorer recognized the image margin, but Firefox, Opera, and Netscape didn’t.

    In any case, I’d like a solution that would make *all* images automatically appear with a margin, so I won’t have to change the html code for every single one of them.

    Any suggestions would be much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can apply a CSS style to all images like this:

    img {
    border: 0;
    margin: 0;
    blah: blee; }

    And it would help to have a link to your page.

    Increate the specificy of those images, instead of img.floatRight, use #content .post img.floatRight

    Thread Starter altfg

    (@altfg)

    Aha! I tried the
    blah: blee method
    and it worked!

    Seriously, thanks very much.

    img {
    border: 0;
    margin: 10px;
    )

    did work.
    And thank you “basketball” for your response, too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS – image margin issue’ is closed to new replies.