Jump to content

Centre align gallery

Recommended Posts

37 minutes ago, decoratedwolves said:

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

Hi,

I'm looking to centre-align my gallery in rows of 3 when on desktop view in particular.
Can someone please help?

Also, is it possible to alter the size of the gallery images?

https://www.decoratedwolves.com/

Cheers

Steve

Did you centering the left over like so?

image.thumb.png.3239472fdc06c8e23993fa094ab89303.png

@media only screen and (min-width: 1296px) {
    .sqs-gallery-design-autocolumns-slide {
      position: static;
    }
    .sqs-gallery-design-autocolumns {
      display: grid;
      grid-gap: 0 0;
      grid-template-columns: repeat(3, 1fr);
    }

    .sqs-gallery-design-autocolumns-slide:last-child:nth-child(3n - 2) {
      grid-column-end: 3;
    }
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 3/22/2021 at 11:28 AM, bangank36 said:

Did you centering the left over like so?

image.thumb.png.3239472fdc06c8e23993fa094ab89303.png


@media only screen and (min-width: 1296px) {
    .sqs-gallery-design-autocolumns-slide {
      position: static;
    }
    .sqs-gallery-design-autocolumns {
      display: grid;
      grid-gap: 0 0;
      grid-template-columns: repeat(3, 1fr);
    }

    .sqs-gallery-design-autocolumns-slide:last-child:nth-child(3n - 2) {
      grid-column-end: 3;
    }
}

 

Hey,

Yes, this looks like what I would like.
However, that code didnt work on my end...

 

Screenshot_2021-03-23 STEVE CALDERWOOD.png

Link to comment
On 3/25/2021 at 9:35 PM, decoratedwolves said:

Hey,
No, not managed to.

Just tested. I think the above code should work. Where did you add the code? If custom code doesn't work, try adding this to Settings > Advanced > Code Injection > Header

<style>
  @media only screen and (min-width: 1296px) {
    .sqs-gallery-design-autocolumns-slide {
      position: static;
    }
    .sqs-gallery-design-autocolumns {
      display: grid;
      grid-gap: 0 0;
      grid-template-columns: repeat(3, 1fr);
    }

    .sqs-gallery-design-autocolumns-slide:last-child:nth-child(3n - 2) {
      grid-column-end: 3;
    }
}
</style>

 

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
  • 1 month later...

Hey,

Unfortunately, 'Code Injection' is only available on Business/Commerce accounts and that code doesnt seem to work when added to 'custom CSS'.

Any other options?

Thanks

S

Link to comment
20 hours ago, decoratedwolves said:

Hey,

Unfortunately, 'Code Injection' is only available on Business/Commerce accounts and that code doesnt seem to work when added to 'custom CSS'.

Any other options?

Thanks

S

Add to Design > Custom CSS

  @media only screen and (min-width: 1296px) {
    .sqs-gallery-design-autocolumns-slide {
      position: static;
    }
    .sqs-gallery-design-autocolumns {
      display: grid;
      grid-gap: 0 0;
      grid-template-columns: repeat(3, 1fr);
    }

    .sqs-gallery-design-autocolumns-slide:last-child:nth-child(3n - 2) {
      grid-column-end: 3;
    }
}

 

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
13 hours ago, decoratedwolves said:

Hey,
Thanks for that but this is what has happened...

 

Screenshot_2021-05-18 STEVE CALDERWOOD.png

Try new code

@media only screen and (min-width: 1296px) {
    .sqs-gallery-design-autocolumns-slide {
      position: static;
    }
    .sqs-gallery-design-autocolumns {
      display: grid;
      grid-gap: 0 0;
      grid-template-columns: repeat(6, 1fr);
    }

    .sqs-gallery-design-autocolumns-slide:last-child:nth-child(2n - 7) {
      grid-column-end: 4;
    }
}

 

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.