Jump to content

Remove Border Around Logo Image

Go to solution Solved by Ziggy,

Recommended Posts

I recently added custom css to make a border around the images in my shop. However, this code has made borders around other images on my site. The logo at the top left corner of my site now has a border, I'm wondering if there is any way to prevent this.

 

This is the code I used to add the borders:

img {
    border: 1px solid #cccccc;
  margin-left: 3px;
  margin-right: 3px;
  margin-top: 3px;
}

 

Thank you!

Link to comment

Yes, you're currently targetting every image because you are using the selector img

Can you share your website URL and which images you do want to target? Is it the grid images on the store front page? Or on the product page? Both? Or somewhere else?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • Solution

Use this selector:

.ProductList-item img

and:

.ProductItem-gallery-slides-item img

to replace img, and comma separate them like this:

.ProductList-item img, .ProductItem-gallery-slides-item img {
  border: 1px solid #cccccc;
  margin-left: 3px;
  margin-right: 3px;
  margin-top: 3px;
}

Hope that works for you!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

Happy to help!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • 8 months later...

Hi there-

@Ziggy

Does anyone know what CSS code can REMOVE the box around images? I have uploaded transparent images from Canva and on some pages, not all, there is a thin black box around these images that I want removed. **Please note the CSS that is already carefully in place was entered in by Big Cat Creative from the template I purchased, so I do NOT want to ruin anything. Do you know the code to remove the box, and can you confirm it won't mess up my template? THANK YOU!

Link to comment

@Megkay07 can you share your website URL and a page this is happening on?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

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.