Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1415205

    Hi, in trying to show the entire headshot of 3 women in a row in a flip box using the Icon/Flipbox Grid, I found some css here on the forum that looks like this:
    /*FLIP BOX IMAGES */

    .avia-icon-grid-container,.avia-icongrid-wrapper,.article-icon-entry {
    height:45vh;
    }
    .responsive #av_section_1 > .container {
    max-width: 1810px;
    }
    And it did the trick. Now my images appear fully – headshots – in each box. See here: https://nimb.ws/mElxhA
    But, now if I use an icon list element, it adds a ton of space between each list item (probably the 45vh height), shown here: https://nimb.ws/BKxpDs

    I tried giving the flip boxes an id or css class, but that didn’t work. Would love your help. Thank you!

    #1415303

    Hey Eleina,

    Thank you for the inquiry.

    We may need to inspect the elements in order to understand the issue better. Please provide the login details in the private field so that we can access the site.

    Best regards,
    Ismael

    #1415379

    Okay, well, as it turns out, the more important issue is that I’m trying to have the flip boxes show head shots of 3 people, and the entire image needs to be on the front of the flip box.

    So to accomplish that, I searched the Enfold Forum and found this CSS:

    .avia-icon-grid-container,.avia-icongrid-wrapper,.article-icon-entry {
    height:50vh;
    }
    .responsive #av_section_1 > .container {
    max-width: 1810px;
    }

    And it looks great on a large desktop computer screen, but not great on other screen sizes. They get vertical and cut off part of their face and name.

    So I’m wondering if there is a way to customize these boxes to be exactly the size of the images or image proportion, take the full image? I hope that makes sense. And thank you. I have a coming soon page up, so I’ll provide login credentials in Private Content.

    thank you as always for your help!

    #1415628

    Hi,
    Thanks for the link to your site, I believe setting the height to a specific size like 50vh is not a good approach for all screen sizes, so I disabled your css, it is still there if you want to go back to it, I just commented it out.
    I recommend making the height and width equal sizes since your images are practically square, and change the default background size from cover to contain
    So I added this css to make your images show full size and not be cropped:

    #av_section_3 .avia-icon-grid-container .avia-icongrid-flipbox .avia-icongrid-wrapper .avia-icongrid-front.bg-img:before {
        background-size: contain;
    }
    

    Then I added this code to the end of your child theme functions.php file in Appearance ▸ Editor to the height and width equal sizes:

    function custom_icongrid_script() { ?>
      <script>
    (function($) {
    var cw = $('#av_section_3 .avia-icongrid-front').width();
    $('#av_section_3 .article-icon-entry').css({'height':cw+'px'});
    }(jQuery)); 
    </script>
      <?php
    }
    add_action('wp_footer', 'custom_icongrid_script');

    Now at different screen sizes the flip box is square and your images naturally fit as you would expect.
    Please note that if you test on a desktop emulating different screen sizes, each time that you change the size you will need to reload the page for the javascript to work, this will cause no issues on real devices because the never change their page loadin size from mobile to tablet suddenly like you are in testing with a desktop browser.
    Please clear your browser cache and check.

    Best regards,
    Mike

    #1415714

    Hey Mike,

    I cannot thank you enough for your help. This looks great and what a cool look this turns out to be, I love it!!

    So appreciate all of your help, you are awesome!

    #1415733

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Icon/Flipbox – Make Image Fill entire FlipBox Space (Headshot)’ is closed to new replies.