Jump to content

Custom Portfolio Grid Layout Per Row

Go to solution Solved by Vigasan,

Recommended Posts

  • Solution

Add this to CUSTOM CSS. The nth-child(1) and nth-child(2) tells the code to make the 1st and 2nd items 50% width, so if you want other items to also be that width, just continue adding numbers as needed. The code is also set to only work on desktop/tablet and exclude mobile so it'll default to the 1 item per column on mobile.

/* Edit 1st and 2nd item to take up half the width each */
@media screen and (min-width: 768px){
    .portfolio-grid-overlay {
      grid-template-columns: repeat(6, 2fr) !important;
    .portfolio-grid-overlay .grid-item{
      grid-column: span 2 !important;
    .portfolio-grid-overlay .grid-item:nth-child(1), .portfolio-grid-overlay .grid-item:nth-child(2){
      grid-column: span 3 !important;


Edited by Vigasan

If an answer I provide helps you, please mark it as the answer so others can easily access it as well.

I'm a Squarespace Authorized TrainerSquarespace Expert, and Circle Member and I've been helping my clients as well as those here in the forum and in various Squarespace groups with custom coding and support for Squarespace websites. I would love to help you in any way I can.

Squarespace PluginsBook Live Help | Squarespace Video Tutorials | Buy Me a Coffee

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.