Tagged: 

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

    I’m using an icon grid with 6 items in 2 rows and 3 columns. The second row is offset, pushing the last item to a 3rd row. I’ve asked about this issue in the past and it was fixed with some custom but that is no longer working. Any ideas on how to fix this?icon grid

    #1257731

    Hey eliseneonrhino,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1257732

    Hi Victoria – here’s my website https://www.neonrhinomarketing.com/
    Thanks!

    #1257776

    Hi eliseneonrhino,

    Best regards,
    Victoria

    #1258073

    Thank you for your help!

    #1258452

    Hi eliseneonrhino,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1268022

    I have the same issue, except that I have a gap between rows.
    Apparently it’s depending on the viewport width (one will find out while resizing the browser window) and the height of the boxes (resulting from the content).

    Best, Jürgen

    • This reply was modified 3 years, 10 months ago by JVo.
    #1268207

    Hi Jürgen,

    https://share.getcloudapp.com/llunEjgw For some reason this block gets a bigger height and so there is that space below.

    Best regards,
    Victoria

    #1268286

    Hi Vic,
    yes, that is exactly what I’ve stated above!
    If you make the browser window narrower, the blocks become narrower and thus the text lines shorter, resulting in more lines => bigger height.

    Upon resize event, apparently you recalculate the min-height attribute of each .article-icon-entry.
    BUT: Sometimes your calculation is WRONG, since the li ancestor can become taller than the .article-icon-entry! I have ANFI, why this happens.

    If I look for the tallest li element (in your example 351,19px) the min-height of the .article-icon-entry elements should also become 351,19px. But obviously it is 295.188px (since the outerHeight of tallest .article-icon-entry element is 295.188px).

    If I set min-height of the elements manually to the correct value by executing jQuery(‘.article-icon-entry’).css(‘min-height’, “351.19px”), all is good for the moment: the gap is closed (until I resize the browser window).

    Digging in your code in iconlist.js, I find these lines:

    
    				setMinHeight: function (els) {
    
    					if (els.length < 2) return;
    
    					var elsHeights = new Array();
    					els.css('min-height', '0').each(function (i) {
    						var current = $(this);
    						var currentHeight = current.outerHeight(true);
    						elsHeights.push(currentHeight);
    					});
    
    					var largest = Math.max.apply(null, elsHeights);
    					els.css('min-height', largest);
    

    Just calculate currentHeight from the outerHeight of the li parent (instead of the article element itself) like so:

    
    						var current = $(this).closest('li');
    

    That did the trick for me (and will do probably for everybody else running into that problem)!
    You can thank me later.

    Best, Jürgen

    #1268858

    Hi JVo,

    Glad you got it working for you and thank you for sharing! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

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