Gap between portfolio image items

  • Posted in : BookCard WP
  • jimclark509
    Participant

    I have a portfolio page that has 2 images on it, one above the other. For some reason, there is about an inch of white space between the images. How can I adjust the CSS so that the images don’t have quite so much padding between them?

    serkan
    Moderator

    Hi jimclark509;
    Use this custom css;

     .portfolio-field img { margin-bottom: 20px; } 
    jimclark509
    Participant

    That didn’t make a difference. I even tried it with 2px and there’s still a 1 inch gap between them.

    jimclark509
    Participant

    It looks to me like the 2em of padding in the .portfolio-field is what’s causing the gap, because each image is in it’s own portfolio-field.

    However, if I do this:

    .portfolio-field { padding-top:0em; }

    …then the top of the page looks bad because there’s not enough gap above and below the portfolio title. So I’m not sure how to fix this.

    serkan
    Moderator

    Hi jimclark509;
    Try this custom css;

    .portfolio-title h2 {  padding-bottom: 1em; }
    .portfolio-field {  padding-top: 0; }
    .portfolio-field h3:first-child { margin-top: 1em; }
    .portfolio-field img { margin-bottom: 20px; }
    .portfolio-field img { margin-bottom: 20px; }

    => you can decrease this px if you like..
    Thanks

    jimclark509
    Participant

    That works well, thank you.

    serkan
    Moderator

    You’re welcome.

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register