kimmydesign Posted August 25, 2023 Share Posted August 25, 2023 Hi there! I'm trying to add a while border to all images in a specific section. I'm using this code for each blockID #block-0c00759fd0846c881ded { border: 8px solid white; padding: -8px; } The issue is that it's making the image not fit inside the wrapper anymore, which isn't that big of a deal on desktop but on web it means everything is slightly off. See image below. So two questions: 1. How do I set the stroke to align to the inside of the image wrapper so the image stays within the box I've made for it. 2. How do I add it to all images in a section without having to call out each blockID individually Link to comment
Ziggy Posted August 25, 2023 Share Posted August 25, 2023 Try this method using a pseudo-element: #block-0c00759fd0846c881ded:after { content:''; position:absolute; height:100%; width:100%; background-color:none; border:8px solid #fff; top:18px; right:-30px; } Play with the border, top and right values to get the look you want. Let me know how 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! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
sunicreative Posted August 25 Share Posted August 25 Thank you for this code. I am trying to create on offset border that is layered behind the image instead of the full border being on top of the image. Is there a way to do this so that the border doesn't actually overlap the image on the top/left side? See attached. Thanks very much! Link to comment
Lesum Posted August 25 Share Posted August 25 @sunicreative Can you share your site URL for context? If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
sunicreative Posted August 28 Share Posted August 28 Sure. It's definitely a work in progress lol but here you go: mackerel-bamboo-7why.squarespace.com password: W3arItAgain Link to comment
tuanphan Posted September 1 Share Posted September 1 On 8/29/2024 at 3:08 AM, sunicreative said: Sure. It's definitely a work in progress lol but here you go: mackerel-bamboo-7why.squarespace.com password: W3arItAgain Where is this image? I can't find it on Home or About page https://mackerel-bamboo-7why.squarespace.com/about Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) 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