Adding Div inside of CMS Grid Structure

Is there a way to add a div that is not apart of the current CMS grid? Check out the picture below. This dropdown is a CMS filled grid and I have a spot that I want to fill(red box) but it is not the same CMS collection. Is this possible? Do i need to make a div that has an absolute position and do it like that? I am wondering if there is a better way.

Hey, Cam! Spent a little bit of time with this trying a few things and it does seem like using absolute position is about the only way to get this done. It seems like you’d also have to always limit the collection to a certain number of items so it always falls in the bottom corner. I’m not sure how you’d achieve a true ‘wrap’ where the number of items wouldn’t matter.

I threw together a quick example for you to reference. Here’s a read only link. Hope this helps. Let me know if I can clarify anything or if you end up finding a better solution!

Thanks for confirming this. I appreciate you.

Hey @camputty

You can easily do this with Javascript.

Step 1:
Give all of the CMS items a Class name, let’s call it “cms-custom-grid-item”

Step 2:
Give the same Class name to the Div that you’d like to add to the grid.

Step 3:
Create a new grid and style it the way you want… give it a Class, let’s call it “new-custom-grid”.

Step 4:
Add the code below to your Page Body.

<script>
$(".cms-custom-grid-item").appendTo(".new-custom-grid").show();
</script>

Step 5:
If you’re happy with the results, simply hide “cms-custom-grid-item” and the code snippet will show it once it loaded and ready to be shown.

EDIT: I’ve added Screengrabs to demonstrate.

Hope this helps!

~ Rhino


Huge! Thanks for this Rhino.

This is awesome! Thank you for sharing.

Hi, any idea on how to the the same but with the div item not being in the final position? In your example it’s on the last place of the grid but what if I want my static item to be in the middle of my cms items?
Thanks a lot.