Re: How to add this thin border to my image?

How can I replicate a thin image border on my homepage?

empiricalarby
Trailblazer
227 1 49

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
7781 1882 2308

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!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
empiricalarby
Trailblazer
227 1 49

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
Trailblazer
227 1 49

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

Made4uo-Ribe
Shopify Partner
7781 1882 2308

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
empiricalarby
Trailblazer
227 1 49

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
Shopify Partner
1184 335 287

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
Trailblazer
227 1 49

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

PageFly-Henry
Shopify Partner
1184 335 287

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
Trailblazer
227 1 49

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