Jump to content

How to Adjust to 2 columns in Masonry Grid in Mobile View in Squarespace 7.1

Recommended Posts

@tuanphan perhaps it is has something to do with squarespace updates. There have been some changes lately,  coz your are absolutely right. It looks fine here also. Sorry for the inconvenience. 🙏

 

Take care and thanks for your time. 

Link to comment
  • 1 year later...
On 2/20/2020 at 7:32 AM, tuanphan said:

Add to Home > Design > Custom CSS

@media screen and (max-width:640px) {
figure.gallery-masonry-item {
    width: 50% !important;
    float: left !important;
    transform: unset !important;
    position: initial !important;
}
figure.gallery-masonry-item img {
    width: 100% !important;
}
.gallery-masonry-item-wrapper {
    height: auto !important;
}
}

 

Is there a way to apply this concept to a masonry blog

Link to comment
On 10/10/2023 at 11:38 PM, nahlah said:

yes of course, the link is https://faceoflove.co/diary

Try this CSS Code

@media screen and (max-width:640px) {
div#BlogMasonryContainer {
        columns: 2;
        column-gap: 0;
        height: auto!important;
        display: block!important;
        padding: 0 5px;
    }
    div#BlogMasonryContainer article {
        position: relative!important;
        transform: none!important;
        width: 100%!important;
        display: block;
        padding: 5px!important;
        box-sizing: border-box;
    }

    div#BlogMasonryContainer article img {
        height: 100%!important;
      	width: 100%!important;
    }}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
22 hours ago, tuanphan said:

Try this CSS Code

@media screen and (max-width:640px) {
div#BlogMasonryContainer {
        columns: 2;
        column-gap: 0;
        height: auto!important;
        display: block!important;
        padding: 0 5px;
    }
    div#BlogMasonryContainer article {
        position: relative!important;
        transform: none!important;
        width: 100%!important;
        display: block;
        padding: 5px!important;
        box-sizing: border-box;
    }

    div#BlogMasonryContainer article img {
        height: 100%!important;
      	width: 100%!important;
    }}

 

 

Screen Shot 2023-10-13 at 8.39.08 AM.png

Link to comment

Did we find a solution to reducing the gap in the first column when landscape images are used? @tuanphan

This is what the mobile version of the masonry gallery looks like. I'm really happy with it except for the gaps in the first column.

This is the code I've used:

@media screen and (max-width:640px) {
figure.gallery-masonry-item {
    width: 50% !important;
}
figure.gallery-masonry-item img {
    width: 100% !important;
}
.gallery-masonry-item-wrapper {
  height: auto !important;}
  
figure.gallery-masonry-item {
         float: left !important;
         transform: unset !important;
         position: initial !important;
         padding: 10px!important;
         box-sizing: border-box;
    }
}

Can anyone help me further with this?

 

Screenshot 2023-10-17 at 23.15.27.png

Edited by NicoleDagnyx
Link to comment

Surprisingly I figured it out 😂  Here's the code I used if anyone is interested!

@media screen and (max-width:767px) {
    .gallery-masonry .gallery-masonry-item img {
        height: 100%!important;
        width: 100%!important;
    }
    .gallery-masonry .gallery-masonry-wrapper {
        columns: 2;
        column-gap: 20px;
        padding: 0px;
        height: auto!important;
        display: block!important;
     }
    .gallery-masonry-item-wrapper {
        height: auto!important;
    }
    .gallery-masonry-item {
        position: relative!important;
        padding-bottom: 20px!important;
        transform: none!important;
        width: 100%!important;
        display: block;
       }
}

image.thumb.png.a793f6a9cdf7cd947a4400c8b576bcf1.png

Link to comment
  • 2 months later...
On 1/8/2024 at 9:46 PM, Huib said:

Hi @tuanphan

I'm trying to create a two column masonry view for my blog for mobile, is there way to help me?
 

www.studioswoop.nl/blog

key; !Uchtball0n

 

thanks in advance

image.png.bfaffd6c12bd6c95b4c648a99ea6ac61.png

Use this CSS code

@media screen and (max-width:767px) {
    div#BlogMasonryContainer {
        columns: 2;
        column-gap: 0;
        height: auto!important;
        display: block!important;
        padding: 0 5px;
    }
    div#BlogMasonryContainer article {
        position: relative!important;
        transform: none!important;
        width: 100%!important;
        display: block;
        padding: 5px!important;
        box-sizing: border-box;
    }

    div#BlogMasonryContainer article img {
        height: 100%!important;
      	width: 100%!important;
    }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 1/10/2024 at 4:47 PM, Huib said:

Wauw @tuanphan, this is really helpfull. 

Is there a way to keep the original width of the image instead of the orginal heigth?

 

Wish

image.thumb.png.141640a81738d892c67533a76e86ec4e.png

 

Current
image.thumb.png.58edeb4a79149cad229bdf988cde2a52.png

I can't find a way to fix this. You try posting question in new thread. You can get help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.