Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Styling Select Element for Cross-Browser Support

1546895020

Edited 1546895054
Axel
Pro
Sheet Author
Hello! I'm having a problem getting a <select> element to line up with <imput> elements. The <select> element is aligned differently between Chrome and Firefox. The difference is only 2 pixels, but that's enough to bother me. Chrome: Firefox: I've managed to resolve this issue before, but no solutions seem to work now. I need to start from scratch, but nothing I've found helps. I'm at a loss and need some assistance. Is there any way to change the top margin of a <select> element to be different for different browsers?
1546895455
Finderski
Pro
Sheet Author
Compendium Curator
Without seeing the code, nor knowing what all you've tried... have you tried: white-space :  nowrap ; In your CSS for the element? May need it on the parent div/span/whatever you have contained in.
1546966638

Edited 1546966755
Axel
Pro
Sheet Author
I've previously tried some of these, and right now they actually seem to be working if I use at least 2 of them together, but I'm not sure why. @media screen and (-moz-images-in-menus:0) { select{margin-top: -2px !important;} } @supports (-moz-appearance:none) { select{margin-top: -2px !important;} } @-moz-document url-prefix(){ select{margin-top: -2px !important;} }
1546967130
Axel
Pro
Sheet Author
Actually, that doesn't work. It shows correctly in the preview, affecting only Firefox. However, when I load up the campaign, it's clearly affecting both browsers.
1547000865

Edited 1547001411
The image is too small for me to tell what is misaligned, but it looks like you are trying to adjust vertical alignment? Have you tried applying margin-bottom: 0px to your selects? It works for me in Firefox: And in Chrome:
1547055740
Axel
Pro
Sheet Author
I've managed to get it aligned, thanks!