Results 1 to 6 of 6

Thread: Dropdown menu - can this be done??

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Question Dropdown menu - can this be done??

    Hello,

    I have this code for a dropdown menu. Is it possible to change the
    appearance of each "option" - eg. each option(product1 thru product3)
    must have a different colour and be "bolded" and underlined.

    Can it be done??

    Thanks,
    T

    <select name="test" size="1">
    <option value="Product1">Product1</option>
    <option value="Product2">Product2</option>
    <option value="Product3">Product3</option>
    </select>

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I tried applying a style to just one of the option tags and it didn't work - they all stayed the same.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry

    Jip, I have the same problem. Does this mean it cannot be done!!??

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    I think that different color is possible, but not underline or bold. Option elements have a limited number of inline style attributes available.

    Check this out on MSDN for details of which ones are available.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Unhappy Thanks

    Thanks Monte96!!

    Is there perhaps anyone that can show me some example code??

    T

  6. #6
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Code:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <form name="MyForm" id="MyForm">
    <SELECT ID="oCars" SIZE="1">
    <OPTION style="color: red;" VALUE="1">BMW
    <OPTION VALUE="2">PORSCHE
    <OPTION VALUE="3">MERCEDES
    </SELECT>
    </FORM>
    </BODY>
    </HTML>
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width