Title: CSS &#8211; image margin issue
Last modified: August 18, 2016

---

# CSS – image margin issue

 *  Resolved [altfg](https://wordpress.org/support/users/altfg/)
 * (@altfg)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/css-image-margin-issue/)
 * 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)

 *  [theiconoclast31](https://wordpress.org/support/users/theiconoclast31/)
 * (@theiconoclast31)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/css-image-margin-issue/#post-446429)
 * 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.
 *  [basketball](https://wordpress.org/support/users/basketball/)
 * (@basketball)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/css-image-margin-issue/#post-446431)
 * Increate the specificy of those images, instead of img.floatRight, use #content.
   post img.floatRight
 *  Thread Starter [altfg](https://wordpress.org/support/users/altfg/)
 * (@altfg)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/css-image-margin-issue/#post-446435)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [altfg](https://wordpress.org/support/users/altfg/)
 * Last activity: [19 years, 7 months ago](https://wordpress.org/support/topic/css-image-margin-issue/#post-446435)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
