473,890 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6797
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3210
by: Salve Håkedal | last post by:
When I select Februar here and sends, selection returns to Januar. I know why: no option is marked selected... But can php get this right in an easy way? <html><head><title>Part of a bigger page</title></head> <?php $form =" <form action=\"$_SERVER\" method=\"post\"> <select name=obs_mnd> <option value=\"Jan\">Januar</option> <option value=\"Feb\">Februar</option>
7
2300
by: Hal Vaughan | last post by:
I have a sample script from a book ("Beginning JavaScript" by Paul Wilton) that removes or adds a choice to a <SELECT> element. The <FORM> is form1 and the <SELECT> is theDay. The example uses these lines (full text is below): if (document.form1.theDay.options.text != "Wednesday) { var days = document.form1.theDay; days.options.text = days.options.text; <snip> var option - new Option("Wednesday", 2);
3
23340
by: Darren | last post by:
Please Help Me!! I've created a typical <form> and a <select> element. The options are created dynamically from my access database (using asp). There are about 70 options, and when you click the dropdown button, it shows about 25 (depending on screen resolution) and then the gives you a scroll bar to get to the rest. My question is, can I limit the number of options shown when you click
7
2036
by: | last post by:
I can't get IE 6 to read the values in my <SELECT..> data entry fields. Netscape 7 and Opera see them, and IE will pass the values to the database, but the javascript validation script gets a null value from the selection fields. Text inputs work just fine. Below is the form and validation script (I've added "...." to indicate additional fields in the same format in both the form and the validation) Here's the form:
5
8330
by: Brian Foley | last post by:
Hello, I am used to using the label tag with check boxes and radio buttons in html forms. This allows me to click on the text of the label to activate/deactivate the check box / button, rather than having to click on the (possibly small) box or button. I recently tried to assign a label to a select "drop down list", but found that when I clicked on the label text to bring it into focus, the select box was reset to the first entry. ...
1
1874
by: frey | last post by:
i tried to create a dropdown menu and use the option as a control to change content inside another text area the code is like this: <select name="xxxx"><option onclick="changeunitprice(29.87)" value="1744"/> the function changeunitprice() is called when an option is selected
5
8749
by: Isha | last post by:
Hi all, I wanted to change the background color for only the first option in a select box, but following changed the background color for the whole dropdown box. <select name="alltags" class="select" style="background:yellow"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option>
4
6105
by: html | last post by:
Hello all, I need to change the colour of my text. For the paragraph I do document.fgColor ="blue" ; but how do I do this for the select tags? ....and I prefer it to apply to all select tags Tia.
1
1414
by: thesti | last post by:
hello, i need to validate birthday using javascript. the validation is that for example user couldn't choose the date 29, 30 and 31 if she has chosen February as the month before and the year % 4 isn't 0. i've done this with disabling the 29, 30 and 31 options in the select widget. here's the example code document.register.birthday.options.disabled = true; it works fine with Opera9.6 and firefox3.0.4 but, when i try it with IE6, the...
0
11222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10918
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8015
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7169
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4674
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4270
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3275
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.