Jump to content

Centering gallery thumbnails in index

Recommended Posts

Site URL: https://griffinvothdp.com/film-photography

Hey everyone! I'm hoping someone can help me as I've looked through the forum and can't seem to find an answer. Basically, I'm using avenue and have my indexes set up so that my galleries will display in rows of three, however it bugs me that when I have 4 galleries on an index page, the 4th is left aligned. I was wondering if anyone knows how I can get that 4th gallery to center align so that it's more aesthetic. Thank you :)

Link to comment
  • Replies 3
  • Views 552
  • Created
  • Last Reply
11 hours ago, tuanphan said:

Add to Design > Custom CSS


@media screen and (min-width:641px) {
a.project:nth-child(4) {
    left: 50%;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
}
}

 

You are amazing! Is there a way so that this code can only affect my commercial and photography tab, as those are the only ones where I need the 4th gallery to center. Otheriwse it makes my 4th gallery in my narrative tab hide behind the 5th. Thanks 🙂

Link to comment

You can add this to Commercial & Photography Pages Header

<style>
  @media screen and (min-width:641px) {
a.project:nth-child(4) {
    left: 50%;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
}
}
</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

Archived

This topic is now archived and is closed to further replies.


×
×
  • 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.