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

    Good day,

    I hope you are well.

    I have created portfolio pieces for each of the books on this website. https://hb.dev32.engage24.com/

    I would like all of the portfolio items to display at the same height. Here are the pages you can see the different books.

    https://hb.dev32.engage24.com/books-for-teenages/ – This page is particularly bad because the titles are really long.

    Also can’t quite understand why there is a larger space on the right-hand side of the gallery?

    Many thanks,
    Camilla

    #1394670

    Hey engage24,
    Thanks for your patience and the link to your site, to make all of the titles in the portfolio grids the same height I added this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function equal_height_portfolio_grid_titles() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){
      $('#av-sc-portfolio-1 .grid-sort-container').each(function(){  
       var $columns = $('.grid-entry-title',this);
       var maxHeight = Math.max.apply(Math, $columns.map(function(){
           return $(this).height();
       }).get());
       $columns.height(maxHeight);
    });
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'equal_height_portfolio_grid_titles');

    and this css in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field to center the titles:

    .grid-entry-title {
       align-items: center;
       display: flex;
       justify-content: center;
    }

    This is the result:
    Enfold_Support_144.jpeg
    Please clear your browser cache and check.

    Best regards,
    Mike

    #1395297

    Hi Mike,

    Thank you so much, that worked perfectly!

    I just noticed that the book “What’s the catch” is slightly off. Please can you check it out – https://hb.dev32.engage24.com/books-for-teenages/

    Many thanks,
    Camilla

    #1395436

    Hi,
    Glad to hear this helped, the image for “What’s the catch” is smaller than all of the others, please try correcting the image size by uploading a new correct image, it would be better than adding another script to adjust all of the images when only one is different.

    Best regards,
    Mike

    #1395491

    Hi Mike,

    Oh yes, that makes sense thank you!

    Keep well.

    Kind regards,
    Camilla

    #1395514

    Hi Camilla,

    I’m glad that Mike could help you :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Make portfolio grid the same height’ is closed to new replies.