I have a drop down html form and would like to display the disabled=disabled
element (view the edit below)
At first initial glance, the form skips the disabled
element and displays "option 1".
<select>
<option disabled='disabled'>Title</option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
Is this possible with just html
or css
?
If not then how about jQuery
or javascript
?
Edit
Would like the form to look like this
Currently it looks like
Add selected="selected"
to your first option.
<select>
<option selected="selected" disabled='disabled'>Visible Title</option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
jsFiddle example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With