By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

Change style of Option element in select box

P: 1
I want to make a particular option element in a select box look as bold and center aligned. I tried to edit style of that option element (e.g. font,fontSize,fontWeight etc) but nothing happened.

I could modify only color property of that option.

Please help me.

Oct 10 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,390
hi ...

welcome to TSDN ...

its a simple css question ... as far as i can see the following code works:

Expand|Select|Wrap|Line Numbers
  1. <select>
  2.     <option value="1" style="color: red; font-weight: bold;">test 1</option>
  3.     <option value="2">test 2</option>
  4. </select>
kind regards
Oct 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.