nb********@hotmail.com (Nick) wrote:
Is it possible through css to make an element in a multiple list menu
unselectable.
I'm presuming that you mean a <select> element rather than just an
ordinary list of links.
Why with CSS? CSS is for presentation. Making something unselectable
sounds like functionality to me.
The disabled attribute exists for the option element. But Windows IE
doesn't support it. :-(
Im organizing my list by using titles...
+-------------+
| CATEGORY 1 |
| option 1 |
| option 2 |
| option 3 |
| CATEGORY 2 |
| option 1 |
| option 2 |
| option 3 |
| CATEGORY 3 |
| option 1 |
| option 2 |
| option 3 |
+-------------+
Id like to make the CATEGORIES unselectable. Thanks! -Nick
Looks like you want the optgroup element.
<select name="foo">
<optgroup label="CATEGORY 1">
<option>option 1</option>
<option>option 2</option>
<option>option 3</option>
</optgroup>
<optgroup label="CATEGORY 2">
<option>option 1</option>
<option>option 2</option>
<option>option 3</option>
</optgroup>
<optgroup label="CATEGORY 3">
<option>option 1</option>
<option>option 2</option>
<option>option 3</option>
</optgroup>
</select>
Works in most modern browsers. In older browsers the options are
presented as normal but the labels aren't presented at all.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>