...

View Full Version : Javascript



Twister
10-04-2003, 08:34 PM
I am making a drop down box with a list of URL. You choose the URL that you would like to go to and then click the button. What I want to do is have on particular URL be a different color as it is used the most. Even bold would be fine. I have tried a couple of ideas but nothing is working. Can anyone help?

ACJavascript
10-05-2003, 06:26 AM
I dont think the select box is that dynamic

Jeff Mott
10-05-2003, 07:14 AM
Ideally you would do...
<select>
<option style="font-weight: bold">hello</option>
<option>world</option>
</select>However, only Netscape seems to support this at the moment.

me'
10-05-2003, 11:32 AM
I don't see what's wrong with this:

<select>
<option><strong>hello</strong></option>
<option>world</option>
</select>

ACJavascript
10-05-2003, 04:06 PM
hehe I did the same thing you did jeff
Yea it doesn't work on IE or some of the others I tried.

Isn't it funny, If not all the time we are trying to figure out how to make it work in netscape and now its the other way around hehe

Jeff Mott
10-05-2003, 06:07 PM
I don't see what's wrong with this:
<select>
<option><strong>hello</strong></option>
<option>world</option>
</select>Well... first, it does not work in IE, Opera or Netscape. And second, using the STRONG element for only making bold text in incorrect usage of the element.

me'
10-05-2003, 06:16 PM
Okay, so my code was untested. And yes, it was too early in the morning, would it be better if I used this?

em {
text-decoration: none;
font-weight: bold}

<option><em>Hi!</em></option>

Although that won't work, it makes sense semantically.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum