How can we make one particular option's text bold in html.

Discussion in 'Javascript' started by ahmad, Mar 8, 2006.

  1. ahmad

    ahmad Guest

    I want to make a particular option's text bold within a list in html,
    while all other options will get their normal font-weight, How can i do
    this????????

    i tried <b>, <font> tags and style and class attributes to do this. but
    these didnt work. only text color or background color of a particular
    option can be changed.
     
    ahmad, Mar 8, 2006
    #1
    1. Advertising

  2. ahmad

    VK Guest

    ahmad wrote:
    > I want to make a particular option's text bold within a list in html,
    > while all other options will get their normal font-weight, How can i do
    > this????????


    You can't. <select> style is atomic (applied to all options). You can
    place the option into separate <optgroup> to make it stand out
    visually:
    ....
    <optgroup label="Special">
    <option>...
    </optgroup>
    <optgroup label="Others">
    <option>...
    <option>...
    <option>...
    </optgroup>
    ....
     
    VK, Mar 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ckninar

    How can I bold just one line in an object list?

    ckninar, Sep 8, 2005, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    139
    ckninar
    Sep 8, 2005
  2. ste33
    Replies:
    2
    Views:
    139
    ste33
    Nov 3, 2005
  3. deostroll
    Replies:
    1
    Views:
    178
    deostroll
    Jan 11, 2008
  4. Jonathan N. Little
    Replies:
    7
    Views:
    506
  5. Hot-Text
    Replies:
    1
    Views:
    459
    Hot-Text
    Oct 5, 2012
Loading...

Share This Page