Loading ...
Sorry, an error occurred while loading the content.

4783Re: Background color for dropdown - possible?

Expand Messages
  • John Zeman
    Sep 7, 2004
      --- In ntb-html@yahoogroups.com, "Alec Burgess" <burale@a...> wrote:
      > When creating a form with a dropdown, is it possible to specify the
      > background color?
      > I'm working with a form where the user is asked to select a color
      in a
      > dropdown and I'd like to be able to make the dropdown take the
      > color of the surrounding area so its possible to see which colors
      are "bad"
      > because they won't show up.
      > See sample HTML below my sig. I tried sticking a
      bgcolor="colorname" in both
      > <form> and <select> elements to no effect which seems to be
      confirmed by
      > looking at HTMLib "The HTML reference Library" by Stephen LeHunt.
      > Regards ... Alec
      > --
      > <form>
      > <select name="color">
      > <option value="aliceblue" style="color:
      > aliceblue
      > </option><option value="antiquewhite"
      > antiquewhite;">
      > antiquewhite
      > </option><option value="green" style="color:
      > green
      > </option><option value="aquamarine"
      > aquamarine;">
      > aquamarine
      > </option><option value="azure" style="color:
      > azure
      > </option>
      > </select>
      > </form>

      As sister said, use CSS. Here's a very simple example

      <option style="background-color: #ffffcc">First Choice</option>
      <option style="background-color: #ccccff">Second Choice</option>
      <option style="background-color: #99cccc">Third Choice</option>
    • Show all 6 messages in this topic