Tchan Posted April 25, 2023 Share Posted April 25, 2023 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
Ziggy Posted April 25, 2023 Share Posted April 25, 2023 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
Tchan Posted April 25, 2023 Author Share Posted April 25, 2023 Thank you for your response Ziggy! theochandler.com Yes, I would like the border around the grid images on the store page: https://www.theochandler.com/purchasescores And also a border around the individual product pages such as this one: https://www.theochandler.com/purchasescores/studies-in-change But nowhere else. Thank you! Link to comment
Solution Ziggy Posted April 25, 2023 Solution Share Posted April 25, 2023 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! tuanphan 1 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
Tchan Posted April 25, 2023 Author Share Posted April 25, 2023 Thank you! That solved it! Ziggy 1 Link to comment
Ziggy Posted April 25, 2023 Share Posted April 25, 2023 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
Megkay07 Posted January 14 Share Posted January 14 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
Ziggy Posted January 15 Share Posted January 15 @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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment