SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast Dolbex's Avatar
    Join Date
    Jun 2003
    Location
    Confused USA
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Combo Boxes with Contents

    Does anyone know of a way to have elements inside an option in a combo box? I am trying to display a div box of color beside a discription (a color selector) for each option in a combo box. I thought I could just define it inside "<option value="x">Color <div style="width:10px;heigh:10px;background-color:#------">space</div></option>

    Apparently thats a no go. Any clue?

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only text is allowed in <option> elements.
    Take a look at this: <select> Something New, Part 1
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •