开发者

Cross browser's issue to highlight option item as bold in form element "select"

开发者 https://www.devze.com 2022-12-28 12:51 出处:网络
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 no

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>开发者_JAVA技巧


Vivek try this,

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

For ref Styling Dropdown Lists

0

精彩评论

暂无评论...
验证码 换一张
取 消