Professional Web Applications Themes

Make an element in a multiple list unselectable??? - Macromedia Dreamweaver

Is it possible through css to make an element in a multiple list unselectable. 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...

  1. #1

    Default Make an element in a multiple list unselectable???

    Is it possible through css to make an element in a multiple list
    unselectable. 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
    Nick Guest

  2. #2

    Default Make an element in a multiple list unselectable???

    Is it possible through css to make an element in a multiple list menu
    unselectable. 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
    Nick Guest

  3. #3

    Default Re: Make an element in a multiple list unselectable???

    [email]nboutelierhotmail.com[/email] (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 <stevepugh.net> <http://steve.pugh.net/>
    Steve Pugh Guest

  4. #4

    Default Re: Make an element in a multiple list unselectable???

    Steve Pugh <stevepugh.net> wrote:
    > Looks like you want the optgroup element.
    Maybe. But in the absence of a URL to demonstrate what he is really
    doing, my verdict is that he wants to create an expensive plastic
    simulation of a hierarchic list of links.
    > Works in most modern browsers. In older browsers the options are
    > presented as normal but the labels aren't presented at all.
    OK, let's say that it works in 95 % of browsing situations (as far as
    _rendering_ is considered). The actual figure is probably somewhat
    smaller. Anyway, even 5 % of possible users is a huge number. Is it
    acceptable that the fallback has no label texts? I would answer:
    yes, _if_ the labels are just for grouping options that are
    understandable on their own. But it would be disastrous if e.g. some
    options were identical, relying on the category labels for
    disambiguation.

    It's possible to create a hierarchic menu inside a form without using
    optgroup, namely by using grouped radio buttons, see
    [url]http://www.cs.tut.fi/~jkorpela/forms/choices.html#optgroup[/url]

    Massive crossposting triggered the usual "set Followup-To at random"
    function. In future, the OP should spend some time in yzing which
    is _the group_ for his question.

    --
    Yucca, [url]http://www.cs.tut.fi/~jkorpela/[/url]
    Jukka K. Korpela Guest

Similar Threads

  1. HowTo make TextArea unselectable?
    By huhgawz in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: October 28th, 02:34 PM
  2. 1st element not displaying in a List Box
    By gurvar in forum ASP.NET Building Controls
    Replies: 1
    Last Post: April 9th, 11:36 AM
  3. Create List from Single Array element
    By Mike Paim in forum Macromedia ColdFusion
    Replies: 4
    Last Post: March 8th, 12:20 PM
  4. Numbering each element in a list from a database
    By JasonBarr in forum Macromedia ColdFusion
    Replies: 1
    Last Post: February 17th, 06:28 PM
  5. previous element in a list
    By Nandita Mullapudi in forum PERL Beginners
    Replies: 3
    Last Post: October 17th, 06:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139