In this tutorial, we are going to add a collage section were you can have blocks repositioned in Shopify page using grid layout.
I do hope that Shopify will make use of the grid to position blocks easily.
- Go to Online store> Themes> Actions> Edit code
- Go to Section folder, create a new section and name it custom-collage. Replace the code below, then click SAVE
- Go to Asset folder and create a new .css file. Name it custom.collage. Then paste the code below.
You are done. (“,)
I encountered some issues after creating the video. I added some codes to fix it.
Tips: Use the minimum page height as possible to prevent big gaps at the bottom.
Make sure to assign the number of cells (columns or rows) that fits the title or content.
Make sure you do not have a space in the content box editor. To prevent unnecessary gaps.
Copied!
4 comments
I tried inserting this code into my Dawn theme, and Shopify rejected it citing “Invalid JSON in tag ‘schema’”.
I tried to self-serve a quick fix by running it through a JSON formatter (https://jsonformatter.curiousconcept.com/#), and the result was unintelligible.
Has something changed in the past year to make this trick unusable? Is there a newer version? I really like this concept, and I’d love to be able to implement it on my site…
Very Great Section for Front Page Design, could it applied on page also?
Hi Dylan,
Since image are assigned to the grid area, you can manipulate its size to by occupying less or more grid areas. What I am talking about is the 13:30 part of the video. Regarding at mobile view, I cannot recreate your problem. Items should be displaying flex in mobile view as what we design in the last part of our css code
Hi There,
Tried installing this onto the dawn theme, and when i upload any image, they are just way too big.
And when you switch to mobile view, it only shows 1/8 of the photo..
Any solutions to fix this?
Thanks