Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Two Columns – Image not covering height

  • haseltinedesign

    I have three rows with alternating images and text in each column on my home page.

    It looks great on desktop, but once you start to squeeze the window down to tablet vertical size, the images don’t cover the height and reveal white space beneath them. I need these images to stay at max height centered. They are not backgrounds, they are just images.

    https://snipboard.io/xLBzNu.jpg

    Any recommendations on how to do this properly? I’ve tried so many different ways including GenerateBlocks and Otter page builder.

    Thanks again in advance!

  • Hi there,

    can i see the site ?

  • haseltinedesign

    Yes – https://www.staging3.silverliningsailing.com/

    It’s in staging so it may throw an SSL error.

  • OK.
    1. Add this CSS to your site:

    .has-object-fit-cover figure {
        width: 100%;
        height: 100%;
    }

    2. Select the column Container Block that has your Image Block inside.
    2.1 set the Sizing > Height to 100%
    2.1 in Advanced > Additional CSS Classes add: has-object-fit-cover

    3. Select the Image Block
    3.1 set its Height to 100%
    3.2 set its Object Fit to Cover

  • haseltinedesign

    Worked like a charm – thanks for the help!

  • Glad to hear that

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