Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 350
Sachin B. R. Avatar asked Jan 06 '15 10:01

Sachin B. R.


2 Answers

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>
like image 172
Dan Eastwell Avatar answered Sep 25 '22 19:09

Dan Eastwell


You have to write value in

<option value="APP" label="Apple">Apple</option>
like image 25
jay.jivani Avatar answered Sep 22 '22 19:09

jay.jivani