Jump to content

Get rid of row gaps in portfolio grid on mobile view

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.jaci-cruz.com/

Hello. I am trying to make my portfolio grid go to two columns on mobile view rather than stack. I've got the two columns but can't  get rid of the large gap in between rows. 

here's my code

/* 2 Column Portfolio Grid */
@media only screen and (max-width:640px) {
.portfolio-grid-overlay {
display: inline-flex;
flex-wrap: wrap;
justify-content: space-around;
}
.portfolio-grid-overlay .grid-item {
width: 40%;
}
}

 

Screen Shot 2022-07-14 at 9.27.28 PM.png

Link to comment
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

  • Solution

Remove your code & add this new code

@media screen and (max-width:767px) {
div#gridThumbs {
    grid-template-columns: repeat(2,1fr) !important;
    grid-gap: 10px 10px;
}
}

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Because you haven't removed this code yet. Display inline-flex & width 40% override Squarespace core code, caused problem

image.png.ece39c9126a79fce5d16457cce5e8d69.png

 

 

 

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.