Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Style the font for <select> and <option> tags in FireFox / Mozilla

The font between the <option> tags cannot be changed with CSS in FireFox. (It can be done, using normal CSS statements, in Chrome.) I can change the font for the <select> part of the statement using CSS, so that the selected option appears in my desired font, but the text between the <option> tags in the dropdown list are always in FireFox's default font. This is important because I want to use a monospace font in the option tags.

Can I gain control over style of the font in the <option> tag in FireFox?

My clients are telling me they used to see the monospace font in a dropdown select list in FireFox - until a few weeks ago. Did FireFox change the way they render a directive to change the font using CSS in the <option> and <select> tags? Does anyone know?

I have read that "the standard" does not specify that the contents between the option tags must be stylable - but that some browsers, like Chrome, render the CSS anyway, while FireFox does not.

like image 868
Eileen Jones Avatar asked Oct 29 '25 09:10

Eileen Jones


1 Answers

The question has not been answered. It seems impossible to change the font of the

<option>content</option>

text between the option tags in FireFox. It does work in Chrome.

like image 128
Eileen Jones Avatar answered Oct 31 '25 13:10

Eileen Jones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!