Tchan Posted April 25, 2023 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!
Ziggy Posted April 25, 2023 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 Hire me on Upwork! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Tchan Posted April 25, 2023 Author 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!
Solution Ziggy Posted April 25, 2023 Solution 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 Hire me on Upwork! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Ziggy Posted April 25, 2023 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 Hire me on Upwork! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Megkay07 Posted January 14 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!
Ziggy Posted January 15 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 Hire me on Upwork! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment