Jump to content

I want to increase space between images in the section on only mobile.

Go to solution Solved by Spark-Plugin,

Recommended Posts

Hello,

I want to increase space a bit more between images on only mobile.

Seems like I am using Gallery with Masonry Grid. It doesn't give me an image block code, but only a section ID.

Also I don't mind a code affecting the whole website since I need it in different pages either way.

I would appreciate your help!

Screenshot 2024-09-09 at 1.27.59 AM.png

Link to comment

Can you share your website URL and this page?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

Hello shin322! Hope you are doing well today! I'm here to assist you. Please follow these steps:

  1. Navigate to Pages > Website Tools > Custom CSS.
  2. Paste the following code into the CSS editor.

Important Notes:

  • This code is specifically for the Masonry Gallery and will only work on mobile devices.
  • To adjust the gap between items, change the value in the code at grid-row-gap: 100px;. You can set it to any value you prefer, such as 50px, 20px, etc.
/* Masonry to grid mobile */
@media screen and (max-width:767px) {
	.gallery-masonry-wrapper.gallery-masonry-list--ready {
    height: auto !important;
    display: grid;
    grid-template-columns: repeat(1,1fr) !important;
    grid-row-gap: 100px;
}
figure.gallery-masonry-item {
    position: relative !important;
    width: 100% !important;
    transform: unset !important;
}
.gallery-masonry-item-wrapper {
    height: 100% !important;
}
}

Let me know if you need any further assistance!

Edited by Spark-Plugin

- Answered by Iuno from sparkplugin.com

forumsignature-recommendedcopy2.png.0579645eb1430dc7c1059541dc6456c6.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.