Remove "fix width to content" parameter when on mobile

Hello !

I’ve created a custom dropdown in a reusable element, to reuse it everywhere.

On desktop, I would like to have it fit width to content, and on mobile, no fix width.

My try is to check "fit width to content by default, and add custom css in an html element for mobile.




But not working on mobile…


If someone has an idea :slight_smile: thank you !!!

In your css for #mobiledropdown add the parameter for min-width: 100%! important.

Thank you for the help, that worked :slight_smile:

1 Like

You can replace the CSS with the conditional: Current page width < 768 = min-width: 100%

min width is not available if default is fit width to content