Question:
My CSS works good on Desktop but cannot have any adjustment at mobile
Product:
I used Wix Studio to build my website
What are you trying to achieve:
I’m Trying to have different border-radius px on different device, I use media query to make coding have different corner size on different device but it can only works at desktop
What have you already tried:
I’ve already tried different code, different situation but media query cannot works everywhere
Also curious - is this something that could be done through the editor UI? Set the corner radius on desktop, then on mobile/tablet change it to a different unit?
here’s my CSS and no, this component didn’t have corner radius setting in editor UI but I could done by adding another unnecessary component to achieve adjust corner in editor UI but in this way will cause layout broken easily.
Ahhh okay - from what I’m piecing together, you have a lightbox, and want to customize the border radius of the lightbox, right?
Firstly, Studio uses a mixture of symantic classes, and custom classes to target components (you’ll find the synamtic classes for an element in the “CSS Classes” panel. This shows the area that can be targetted)
, but it hasn’t worked at all. Whether I publish my website or preview it in the editor, it still doesn’t take effect. When I inspect the page, I can see that my media query isn’t being detected at all.
So I switched to using WIX Studio’s original CSS classes and IDs, hoping their specificity is higher than the custom CSS I wrote, so they can override the default styles.
But it seems not working too.
Is there any other ways can solve this issue or what’s reason will cause this issue?
hi I cannot share the link cause it is an internal site. It’s still have problem can’t solve but I’ll change using another widget. Thanks for your assistant
Looking at it again, I see that the screenshot you shared just shows in the bottom right “TPAWidget elements aren’t supported” - meaning if it’s a Third Party App, it won’t support CSS customization at the moment
so you just need corner radius on a lightbox. Just make the lightbox background 0% - add another container - stretch it and give it corner radius. Then you can adjust to suit breakpoints.
no need for CSS code
I just wanted to chime in that I was able to get it it to work on my end but just targeting the custom class within the Editor. I have a very subtle radius on desktop & tablet as shown here:
My educated guess is that the portions like #SITE_CONTAINER don’t target elements and additionally that #main_MF#main_MF are targeting the same ID (though I’m not an expert on CSS by any means).