Can < OPTION > be colored

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jessy
    New Member
    • Oct 2006
    • 106

    Can < OPTION > be colored

    Thats my Question
    is it possible in Php to make the option items colored or to highlight some items.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Ok, I will tell you once: don't over do it with your punctuation. A million periods or question marks will only anger others and not get your question answered sooner. So quit it.

    Can option be colored? PHP doesn't style an html elements, it can set the style of an element but PHP doesn't do this directly.

    Why use PHP to do this? Pointless.

    I'll move this over to HTML because either its more suited there, or your question provided no information whatsoever.

    --Moved to HTML

    Comment

    • jessy
      New Member
      • Oct 2006
      • 106

      #3
      Am i asking something that strange ?

      hasn't anyone tried before to highlight the items in a combo box !

      Comment

      • eWish
        Recognized Expert Contributor
        • Jul 2007
        • 973

        #4
        You can. Here is one way.

        Code:
        <select>
        	<option style='color:red; font-weight:700;' value='Red'>Red</option>
        	<option style='color:blue; font-weight:700;' value='Blue'>Blue</option>
        	<option style='color:green; font-weight:700;' value='Green'>Green</option>
        	<option style='color:gold; font-weight:700;' value='Gold'>Gold</option>
        </select>
        --Kevin

        Comment

        • jessy
          New Member
          • Oct 2006
          • 106

          #5
          Can't Thank U Enough

          Comment

          Working...