NicoleDagnyx Posted October 18, 2023 Posted October 18, 2023 I've created the below code to change the radius of an image on a website I'm building and it's worked perfectly! @media screen and (max-width:767px) { #block-yui_3_17_2_1_1697485376162_9705 img { border-top-left-radius: 20px; border-bottom-left-radius: 0px; border-top-right-radius: 20px; border-bottom-right-radius: 0px; } } My problem is that I'm new to code and I want the same code but for a rectangle shape. 'img' is for image in the code, what would it be for a shape? Thank you
tuanphan Posted October 21, 2023 Posted October 21, 2023 Can you share link to page where you use image? 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!)
NicoleDagnyx Posted October 22, 2023 Author Posted October 22, 2023 (edited) https://orange-calliope-t6c4.squarespace.com/ Page: About us Password: dottydot @tuanphan The corners I want curved are different for desktop and mobile as you can see from the images. Edited October 22, 2023 by NicoleDagnyx
Solution Web_Solutions Posted October 22, 2023 Solution Posted October 22, 2023 2 hours ago, NicoleDagnyx said: https://orange-calliope-t6c4.squarespace.com/ Page: About us Password: dottydot @tuanphan The corners I want curved are different for desktop and mobile as you can see from the images. Add these code on Custom CSS panel in Website > Utilities > Website Tools > Custom CSS. #block-6e9c5a7de129c732854c { border-top-left-radius: 20px; border-bottom-left-radius: 20px; overflow: hidden; } #block-yui_3_17_2_1_1697485376162_10674 { border-top-right-radius: 20px; border-bottom-right-radius: 20px; overflow: hidden; } @media screen and (max-width: 767px) { #block-6e9c5a7de129c732854c, #block-yui_3_17_2_1_1697485376162_10674 { border-top-left-radius: 0px ; border-bottom-left-radius: 20px; border-top-right-radius: 0px; border-bottom-right-radius: 20px } } tuanphan and NicoleDagnyx 2 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible.
NicoleDagnyx Posted October 23, 2023 Author Posted October 23, 2023 That's perfect thank you!! I was definitely missing bits of that
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment