Jump to content

Centering Gallery on Mobile View

Recommended Posts

Site URL: https://www.samaykindra.org/

Hi!

I have a 5 image gallery and am trying to center align it (as opposed to left align) on mobile view. There's three rows with the law row only having one image as opposed to two so I'd like to center it for aesthetic purposes. 

I've tried some code however it ends up aligning everything to the center but with a separate row for each image.

Thanks in advance!

Link to comment
  • Replies 2
  • Views 773
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi. You mean center image 5?

Add this code to Design > Custom CSS

/* Center mobile gallery image */
@media screen and (max-width:767px) {
body.homepage .gallery-grid-wrapper figure:nth-child(5) {
    position: relative;
    right: -50%;
}
}
On 7/1/2021 at 7:47 AM, ish13 said:

Site URL: https://www.samaykindra.org/

Hi!

I have a 5 image gallery and am trying to center align it (as opposed to left align) on mobile view. There's three rows with the law row only having one image as opposed to two so I'd like to center it for aesthetic purposes. 

I've tried some code however it ends up aligning everything to the center but with a separate row for each image.

Thanks in advance!

 

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
10 hours ago, tuanphan said:

Hi. You mean center image 5?

Add this code to Design > Custom CSS

/* Center mobile gallery image */
@media screen and (max-width:767px) {
body.homepage .gallery-grid-wrapper figure:nth-child(5) {
    position: relative;
    right: -50%;
}
}

 

Yes, 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.