Despite the lack of restrictions in the W3 specification, padding in select boxes is not supported by WebKit browsers, including Safari and Chrome. As a result, padding is not applied in these browsers.
To address this issue, consider using text-indent instead of padding-left. Maintain the same indentation amount by incrementing the width of your select box accordingly.
For example, in your code:
By adding text-indent:15px and increasing the width to 258px, the select box will now display the same indent as if it had 15px of left padding, while still functioning correctly in WebKit browsers.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3