Collectionlist grid shifting

I’m experiencing collection list items shifting as hide/show interaction occurs. It seems like it’s moving other items.

Below are screenshots of how the interaction shifts:

Original Layout

Grid Shifts

Is anyone having this issue?

Here is my public share link: LINK
(how to access public share link)

This is happening because items in HTML are set to display: static by default. This means that when their dimensions change, they will push all other elements around them to create their own space, sort of how position: relative works.

Your fix;

  1. Set the Collection Item with the class Collection Item 6 to a max height of 315px only on desktop. Set to none on mobile
  2. Use this piece of code to make sure that the content shows up on top of the other cards when they expand. Put this in the footer code section in page settings;


I have not tested this since this page is not published as demoed here. Let me know if this works

Thank you, Alex!

Setting max height helped to resolve shifting issue! But now I’m having an issue with text boxes.
I believe the script isn’t working for some reason.

1 Like

Hi @censiaR,

This is a great question. It took me a bit of research (I am terrible with javascript), but I was able to get it working. :smile:

​To complete the interaction, please take a look at the following tutorial video:

​The custom code mentioned in the video is as follows:
<script> $(document).ready(function(){ $(".div-block-58").each(function() { $(this).click(function() { if($(this).hasClass( "overlay" )){ $(this).removeClass( "overlay" ); }else{ $(this).addClass( "overlay" ); } }); }); }); </script>

Don’t forget: we must remove the combo class before publishing our site. :wink:

Hopefully this was helpful :nerd_face:

Thank you ! Resolved now :slight_smile: