Jump to content

Create border around an image which works on Desktop and Mobile

Recommended Posts

Site URL: https://roadrunner-dandelion-rk6t.squarespace.com/

Hello,

I am trying to add a border around all images in my Home page. I tried this code on all my homepage sections which have an image, and it only works on Desktop... on Mobile the border appears in the middle of the photo:
section[data-section-id="6200553d157ad22b296f6575"] .content-wrapper {
  content: '';
   border-top: 2px solid #164A06;
   border-right: 2px solid #164A06;
   border-left: 2px solid #164A06;
   border-bottom: 2px solid #164A06; 
   padding: 21vw !important;
}

 

Any ideas are gladly welcome, thank you!

Edited by BrendanMcGreevy
Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 2/8/2022 at 6:41 AM, BrendanMcGreevy said:

Site URL: https://roadrunner-dandelion-rk6t.squarespace.com/

Hello,

I am trying to add a border around all images in my Home page. I tried this code on all my homepage sections which have an image, and it only works on Desktop... on Mobile the border appears in the middle of the photo:
section[data-section-id="6200553d157ad22b296f6575"] .content-wrapper {
  content: '';
   border-top: 2px solid #164A06;
   border-right: 2px solid #164A06;
   border-left: 2px solid #164A06;
   border-bottom: 2px solid #164A06; 
   padding: 21vw !important;
}

 

Any ideas are gladly welcome, thank you!

Your site is private now. Kindly share it with the protected password so we can take a look

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 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.