Forum Moderators: open

Message Too Old, No Replies

Drop Down Menus

editing text

         

fashezee

8:48 pm on May 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How come I cannot bold any text within a drop down menu? Are there special codes I must
use or is it just impossible?

AWildman

8:51 pm on May 12, 2003 (gmt 0)

10+ Year Member



Absolutely. Just create a class for bold text and put it in the opening select as in the following:

<select name = "state" class = "smallboldtext">
<option value = "">Choose your state:</option>
<option value = "California">California</option>
<option value = "Colorado">Colorado</option>
<option value = "Florida">Florida</option>
</select>

.smallboldtext{font-weight: bold;}

fashezee

9:28 pm on May 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, I should have been more specific. I need to bold a specific <option> of the drop down menu.

Regarding the above mention example; I would like to have:

<option value = "Colorado">Colorado</option>
bolded? Is it possible..

AWildman

4:09 pm on May 14, 2003 (gmt 0)

10+ Year Member



Oh...that's a different story. I just played around trying to do that and couldn't get it to work. I won't say it can't be done but I couldn't do it. I tried putting a class on it and simply using <strong> tags.

hooloovoo22

5:25 pm on May 14, 2003 (gmt 0)

10+ Year Member



Credit to BlobFisk for the following:

There are issues with this in certain browsers. Mozilla allows you to style the text and the backgound, while IE allows you to only change the backgound.
For example, this CSS:

.myBold { font-weight: bold; background: #ffc; color: #369; }

and <option class="myBold">Something</option> will show different results in different browsers. In IE you will just see a background colour change, in Mozilla all 3 styles will apply!