Jump to content

Changing boarder radius for mobile only

Recommended Posts

Hi tuanphan,

I am trying to make all corners of the image and shape below the image have a radius of 20px when viewing on mobile. Currently on desktop the image is 400px x 400px x 10px x 10px. Is it possible to change the image corner radius based on the viewing device?

Thanks!

Link to comment
On 4/11/2023 at 12:09 AM, Mork_Walfe said:

Hi tuanphan,

I am trying to make all corners of the image and shape below the image have a radius of 20px when viewing on mobile. Currently on desktop the image is 400px x 400px x 10px x 10px. Is it possible to change the image corner radius based on the viewing device?

Thanks!

Hi,

You mean this?

image.png.93b8dece6c670c975b35fec6dbf78a82.png

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
  • 7 months later...

Any updates on this? I'd also love to change the corner radius of certain elements on mobile. It looks great on desktop, but on mobile I'd love to only round the top of the image and bottom of the white block. Here's what I've tried for the top image that isn't working: 

@media only screen and (max-width:767px) {
#block-b389baa750cd46e5fdc6 {
border-radius: 30px 30px 0px 0px;
}
}
 

Any ideas would be appreciated!

Screen Shot 2023-11-15 at 11.01.35 AM.png

Link to comment
On 11/15/2023 at 11:04 PM, rotanzdesign said:

Any updates on this? I'd also love to change the corner radius of certain elements on mobile. It looks great on desktop, but on mobile I'd love to only round the top of the image and bottom of the white block. Here's what I've tried for the top image that isn't working: 

@media only screen and (max-width:767px) {
#block-b389baa750cd46e5fdc6 {
border-radius: 30px 30px 0px 0px;
}
}
 

Any ideas would be appreciated!

Screen Shot 2023-11-15 at 11.01.35 AM.png

Can you share link to this page?

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
  • 2 weeks later...
23 minutes ago, rotanzdesign said:

@tuanphan yes! it's: https://www.sparrow-health.com/new-home (pw: editmode)

Add these code on Custom CSS panel in Website Utilities Website Tools > Custom CSS.

@media only screen and (max-width: 767px) {
    .fe-block-b389baa750cd46e5fdc6, .fe-block-yui_3_17_2_1_1698415691878_50116, .fe-block-1c0cd067360a978a4d06, .fe-block-2472109614b7d343815a {
        .fluid-image-container {
            border-radius: 20px 20px 0 0 !important;
        }
    }
    .fe-block-yui_3_17_2_1_1698415691878_51271, .fe-block-1d2d4ff91d3806c09714, .fe-block-0d32bb49939ab03eb7c9, .fe-block-e98c75dd39a2626d669c {
        .sqs-shape {
            border-radius: 0 0 20px 20px !important;
        }
    }
}

 

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.


 

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.