Sachin B. R. Sachin B. R. - 1 month ago 9
CSS Question

Dropdown list not visible in Firefox

I have a dropdown list with options not visible in firefox but visble in both IE and Chrome. I have added the code snippet below.



<!DOCTYPE html>
<html>
<head>
<title>Mozilla Test</title>
</head>
<body>
<select id="product" name="product" title="Product" tabindex="14" style="padding-top:1px!important;padding-bottom:1px!important;width:100px;>
<option value="selectFruit" label="--Select--"></option>
<option value="APP" label="Apple"></option>
<option value="BAN" label="Banana"></option>
<option value="GRA" label="Grapes"></option>
</select>
</body>
</html>





Can anybody please help me with this issue.

Answer

This appears to be a bug in firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=40545#c11)

I'm assuming you've tried adding the label as the content of the option element?

<!DOCTYPE html>
<html>
<head>
<title>Mozilla Test</title>
</head>
<body>
<select id="product" name="product"  title="Product" tabindex="14" style="padding-top:1px!important;padding-bottom:1px!important;width:100px;>
		<option value="selectFruit" label="--Select--"></option>
		<option value="APP" label="Apple">Apple</option>
		<option value="BAN" label="Banana">Banana</option>
		<option value="GRA" label="Grapes">Grapes</option>
</select>
</body>
</html>