[Resolved] How to remove padding below image in 2 column section

Home Forums Support [Resolved] How to remove padding below image in 2 column section

Home Forums Support How to remove padding below image in 2 column section

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #739046
    Roger

    I’ve created a full width section with 2 columns on my About page. The left column contains an image that I’d like to fill the column. However, I can’t find a way to remove the padding / margin below the image which leaves the background color visible.

    Grateful for advice on this one.

    #739087
    Leo
    Staff
    Customer Support

    Hi there,

    This CSS is added in Simple CSS:

    .lgc-column {
        padding: 10px;
    }

    Let me know if this helps 🙂

    #739156
    Roger

    Thanks Leo. I’ve already removed that padding and I’m still seeing a margin /padding below the image. Any ideas?

    #739169
    Leo
    Staff
    Customer Support

    I still see it being added:
    https://www.screencast.com/t/uNTnEBLKs9Tk

    Am I looking at the right section?

    #739174
    Roger

    Ah, no. The section I’m referring to is this one: http://bit.ly/2FDKgRy

    #739208
    Leo
    Staff
    Customer Support

    Hmm can’t quite tell where is that coming from either.

    What happens if you remove the <div class="my-grid-div">? Not sure why that’s needed? You can add custom classes to LGC itself.

    #739375
    Roger

    I’ve removed the div class and tried a bunch of variations with the css but I can’t find a way to remove all padding/margins from the image in the left-hand column so that it covers 50% of the section.

    Grateful for any more help on this one!

    #739710
    David
    Staff
    Customer Support

    Hi there,

    remove the padding CSS that Leo mentioned and add this CSS:

    .inside-grid-column {
        height: 100%;
    }
     .inside-grid-column img {
         height: 100%;
         widthH: 100%;
         object-fit: cover;
    }
    #740167
    Roger

    Thanks David. With that help from you and Leo we’ve nailed it!

    In summary:

    Apply a custom class to the section (in the section settings):
    my-class

    Add this CSS to remove the padding:

    .my-class .lgc-column, .my-class .generate-sections-inside-container, .my-class .inside-grid-column {
    padding: 0;
    }

    Add your CSS (with the extra custom class):

    .my-class .inside-grid-column {
        height: 100%;
    }
     my-class .inside-grid-column img {
         height: 100%;
         widthH: 100%;
         object-fit: cover;
    }

    This allows the image to fill the column in which it’s inserted within a targeted section.

    #740280
    David
    Staff
    Customer Support

    You’re welcome from Leo and I – glad we could help

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.