Jump to content

Using code to correct for Portfolio pages having the same layout throughout a site

Recommended Posts

Site URL: https://www.ericblumenfeld.com

Hi -- I'm trying to give my different portfolio pages different layouts -- ideally three across for the page containing three projects and two across for the one containing two projects. Unfortunately whatever layout I set for portfolio pages carries through the whole site and can't be individualized, so I need some sort of design code to edit their appearance. Can anyone help here?

Thanks! 

Link to comment

Hello,

How strange, I'm not sure if this is a new issue or has always been the case when using the same "grid:simple" or template grids on the website for different portfolio pages. I would bring it to the attention of a support representative if you feel so compelled.

To make matters more strange, Squarespace's grid system is finicky and will reject standard grid CSS. Here's the code I use, just target the section that you want to have 2 columns. Be careful setting any other dimensions like spacing after inserting the code or remember to disable it when editing and adjust accordingly.  

[data-section-id="YOUR_SECTION_ID_HERE_"] {
  @media only screen and (min-width:640px){
.portfolio-grid-basic{
  display: grid !important;
grid-template-columns: repeat(2,minmax(~"250px, 1fr")) !important;
	}
  }
}

 

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.