469,303 Members | 2,025 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,303 developers. It's quick & easy.

Is it possible to have IE show different font styles for individual options in a <select> ?

The following works in Firefox buy not in Internet Explorer:

<select>
<option> option1 </option>
<option style="font-style: bold"> option2 </option>
</select>

Are there any workarounds to allow IE to show different font styles for
different elements in a select list?

Jul 24 '05 #1
4 6611
Glen K wrote:
The following works in Firefox buy not in Internet Explorer:

<select>
<option> option1 </option>
<option style="font-style: bold"> option2 </option>
</select>

Are there any workarounds to allow IE to show different font styles for
different elements in a select list?

Yes. Use "font-weight".
There is no "bold" attribute for "font-style" in CSS. Firefox must be
guessing what you really meant.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 24 '05 #2
On Thu, 21 Apr 2005 08:57:25 -0700, Jim Moe wrote:
Glen K wrote:
[quoted text muted]

Yes. Use "font-weight".
There is no "bold" attribute for "font-style" in CSS. Firefox must be
guessing what you really meant.


That doesn't work either. As far as I know IE doesn't support
anything other than color for the <option> tag.

Jul 24 '05 #3
These two articles describe what you're looking for:
http://www.devarticles.com/c/a/Web-S...ng-the-Select/
http://easy-designs.net/articles/replaceSelect/

- Fatalis Erratum

Jul 24 '05 #4
On Thu, 21 Apr 2005 14:17:46 -0700, Fatalis Erratum wrote:
These two articles describe what you're looking for:
http://www.devarticles.com/c/a/Web-S...ng-the-Select/
http://easy-designs.net/articles/replaceSelect/

- Fatalis Erratum


Thanks, I'll give these a try. Although I am still worried about
performance issues since some of my list boxes are going to have a large
number of options and I'm guessing the browser's built in <select> is
going to perform better than one implemented in JavaScript.

Jul 24 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Salve Håkedal | last post: by
7 posts views Thread by Hal Vaughan | last post: by
7 posts views Thread by | last post: by
5 posts views Thread by Brian Foley | last post: by
5 posts views Thread by Isha | last post: by
4 posts views Thread by html | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.