Jump to content

How to centre images using code??

Recommended Posts

Hi, I am working on a 7.0 site where I need the gallery images to be larger on mobile . I know how to get the code for each image and make them larger however they are not entered now. Does anyone know the code to centre the images. This is my code below.

/* CSS FOR MOBILE */
@media @mobile {
/* Insert Code for Mobile Below This Line*/


  #collection-615435ef6ec44457a9705c06 {  width: 150% !important; margin: 0 auto; }
 

/* Insert Code for Mobile Above This Line */
}

 

Thanks

Link to comment
  • Replies 1
  • Views 313
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 9/30/2021 at 4:53 AM, huttoncreative said:

Hi, I am working on a 7.0 site where I need the gallery images to be larger on mobile . I know how to get the code for each image and make them larger however they are not entered now. Does anyone know the code to centre the images. This is my code below.

/* CSS FOR MOBILE */
@media @mobile {
/* Insert Code for Mobile Below This Line*/


  #collection-615435ef6ec44457a9705c06 {  width: 150% !important; margin: 0 auto; }
 

/* Insert Code for Mobile Above This Line */
}

 

Thanks

You can share your site with a protected password, so we can check it together

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

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.