Forums

[resolved] Margin/Padding Issue around Image (7 posts)

  1. proudtobedad
    Member
    Posted 1 year ago #

    Hi there,
    I'm using Modularity Lite, and am having an issue with margins around images. On my pages, the margins around photos look fine, but in my posts, the text runs right up to the image.

    Any idea where I'd fix this? I've played around with most of the items on the style sheet, but nothing has fixed it.

    Thanks!

  2. jkovis
    Member
    Posted 1 year ago #

    WordPress adds the following classes to images it inserts:

    .centered
    .alignright
    .alignleft
    .alignnone

    Can you post a link to your site?

  3. proudtobedad
    Member
    Posted 1 year ago #

    Here it is. You'll see on the home page that the photo and text run into each other, but on other pages, such as the "About/Bio" page, the images have a margin around them. I'd appreciate any help you can give!

  4. jkovis
    Member
    Posted 1 year ago #

    It looks like the link didn't post.

  5. proudtobedad
    Member
    Posted 1 year ago #

  6. jkovis
    Member
    Posted 1 year ago #

    These two styles are overriding img.alignright:

    .home .size-medium, .home .size-large {
      max-width: 590px;
      height: auto;
      overflow: hidden;
      margin: 0 .55em .55em .65em;
    }
    .content .size-medium, .content .size-large {
      margin: 0 1.5em 1.5em 0;
    }

    The easiest thing to do may be to add an !important statement to the margins on img.alignright so it reads: margin: 5px 0 5px 20px !important;

  7. proudtobedad
    Member
    Posted 1 year ago #

    Perfect! That did the trick!

    Thanks so much!!

Topic Closed

This topic has been closed to new replies.

About this Topic