How to add this thin border to my image?

empiricalarby
Pathfinder
151 1 27

Please see this shop page - https://empiricalwater.com/pages/shop

On that page, my product has a thin border around it. I'd like to replicate that border on the same image on my homepage: https://empiricalwater.com

How can I do this?

 

Thanks!

Replies 9 (9)

Made4uo-Ribe
Shopify Partner
5414 1302 1599

Hi @empiricalarby 

Check this one.

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

#Banner-template--16982408331515__d9460014-5fa1-484c-b9e0-1a7c0be081bb .banner__content {
    border: var(--media-border-width) solid rgba(var(--color-foreground), var(--media-border-opacity));
}

 

  • And Save. 
  • Result:
  • Made4uoRibe_1-1701026428375.png

     


     

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


empiricalarby
Pathfinder
151 1 27

Apologies for the miscommunication, I meant I do in fact want the border. I'd like to see it on that image as it appears on my home page: https://empiricalwater.com/

empiricalarby
Pathfinder
151 1 27

Oh I see it, is there a way to make that border fit the square product picture?

Made4uo-Ribe
Shopify Partner
5414 1302 1599

Im trying to aim that one, but I cant find the container of your image. Seems like the image is with that background. 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


empiricalarby
Pathfinder
151 1 27

Also I'm getting an issue on mobile where the bottom of the image has 2x the border thickness, but the top and sides have no border. Let me know if you have a solution. Thank you

image0.png

PageFly-Henry
Astronaut
957 272 215

Hi @empiricalarby 

This is Henry from PageFly - Landing Page Builder App

 

You can try this code by following these steps: 

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file base.css

Step 3: Paste the below code at bottom of the file -> Save

 

#Banner-template--16982408331515__d9460014-5fa1-484c-b9e0-1a7c0be081bb .banner__content.banner__content--middle-center.page-width {

    border: 1px solid #00000045;

}

 

Hope that my solution works for you.

Best regards,

Henry | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

empiricalarby
Pathfinder
151 1 27

Thanks, is there a way to make the border a square so that it fits the product picture?

PageFly-Henry
Astronaut
957 272 215

You can try again with this code:

.banner__content.banner__content--middle-center.page-width {
 padding: 0 !important;
border:  2px solid grey !important;
}

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

empiricalarby
Pathfinder
151 1 27

Sorry for the late reply!

 

I tried your solution, and it almost worked. The only issue is the line does not conform to the dimensions of the image itself, as you can see below:

Desktop Screenshot 2023.12.11 - 17.56.38.86.png

Let me know if you can solve this, thanks