Hi can you guys help me understand whats hapenning with the variant button expand/decrease effect depending on which button is selected. This effect is causing my top choice badge to position incorrectly there is either extra gap or overlay depending on the variant button effect state. Preview: The Lowrider | Europe's Premium Body & Intimate Trimmer
hi @JustinasR,
It looks like others have already helped resolve your issue. However, I noticed that when zooming in on the webpage, the badge position becomes misaligned.
To fix this, you may need to place the image within the variant button HTML so it stays properly aligned.
Thanks that helped! However with below code only for 2 specific products (Grand bundle & Superior bundle) for some reason in mobile version only the button keeps moving back up based on selection. This is weird because no other products are doing this but only 2:
It’s just not that greatly made so you’ll keep having these issues because the .samita-container is in a different part of the hierarchy and not actually part of the elements for the option or it’s label.
There’s also using adjusting things like box-sizing: border-box;
Though really you just should try to move it to being a CSS background ::before pseudo element on the label.
Or as part of a flexbox in the options container but you’d likely have to go up the chain a bit adjusting sizes or making other parts flexbox as well.
I’d agree with what’s said above – this is absolutely unsustainable way of doing it.
Browser width, zoom level, font size – every change will potentially break your design.
It’s hard to tell without seeing the whole picture.
The labels seem to be output by an app, but based on what?
Again, hard to tell without seeing the app config.
Ideally, the labels should be part of or next to variant picker buttons, or have some identifying property to link labels to variant selectors…
Yes the label comes from a 3rd party app. For e.g. desktop version english language they are positioned using selector .product-options .option-value.option-value-rounded:nth-of-type(1) and then moved into position using margin setting.