tags:

views:

62

answers:

1

Hello All ,

I am facing one weird cross browsers problem i.e. I want to highlight some of the option items as bold by using CSS class in my form element "select". This all is working fine in firefox only but not in other browsers like safari , chrome and IE .Given below is the code.

<html>
 <head>
  <title>MAke Heading Bold</title>

  <style type="text/css">

  .mycss {font-weight:bold;}

  </style>

 </head>

 <body>

  <form name="myform">

   <select name="myselect">

    <option value="one">one</option>
    <option value="two" class="mycss">two</option>
    <option value="three" >Three </option>
   </select>

  </form>
 </body>
</html>

Please suggest me best possible solution for this .

Thanks Vivek

+1  A: 

Vivek try this,

<style type="text/css">
   option.mycss{font-weight:bold;}
</style>

For ref Styling Dropdown Lists

Pandiya Chendur
Hi , even this is working for firefox only ....If you check this reference site alsohttp://www.outfront.net/tutorials_02/adv_tech/funkyforms5.htmin chrome, IE or safari ....Bold headings doesn't come in dropdown ...thanks
Vivek