Reputation: 4693
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
Upvotes: 4
Views: 5852
Reputation: 207901
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>
Upvotes: 9