Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

format text in dropdownlist

1 view
Skip to first unread message

Klaas

unread,
Jul 27, 2006, 9:24:09 AM7/27/06
to
Hi,

Is it possible to get the text in a dropdown list to be bold or italic?
Some entries I want to have bold others normal and others italic.
I cant figure out how to do this.

tia


@-h-o-t-m-a-i-l-c-o-m Alessandro Zifiglio

unread,
Jul 27, 2006, 10:18:57 AM7/27/06
to
hi, you can test this yourself easily. Here is a basic test below.

<asp:DropDownList style="font-weight: bold;" ID="DropDownList1"
runat="server">
<asp:ListItem style="font-color:
red;background-color:green">a</asp:ListItem>
<asp:ListItem style="color: red">b</asp:ListItem>
<asp:ListItem style="font-family: Verdana; font-size: 16px"
Value="c">c</asp:ListItem>
</asp:DropDownList>

In the above test, note how the font-weight is being applied in the
dropdownlist(select element) itself and not on the listitem. Applying it on
the list item has no effect in IE. Only Firefox seems to support this. The
same for font-family and font-size. Cant be applied individually on the
listitem(option element).

You can try other options whereas to using font-weight. Try color or
background-color, those work at the listitem level, cross browser.

Regards,
Alessandro Zifiglio
http://www.AsyncUI.net

"Klaas" <NoS...@klaas.com> ha scritto nel messaggio
news:u6bgz$XsGHA...@TK2MSFTNGP03.phx.gbl...

Klaas

unread,
Jul 27, 2006, 11:10:31 AM7/27/06
to
Thanks for the answer. So it's not possible for IE...:-(
To bad.

"Alessandro Zifiglio" <AlessandroZifiglio @ -h-o-t-m-a-i-l-c-o-m> schreef in
bericht news:eNdWaeYs...@TK2MSFTNGP03.phx.gbl...

@-h-o-t-m-a-i-l-c-o-m Alessandro Zifiglio

unread,
Jul 27, 2006, 11:39:01 AM7/27/06
to
Your welcome. Yes, from that small test you can see that font-weight is
ignored on the listitem and cannot be applied individually in IE. Only
firefox seems to have this working :|

So your left with specifying font-weight on the dropdownlist itself but this
will apply to all listitems and wont set individually.

Regards,
Alessandro Zifiglio
http://www.AsyncUI.net

"Klaas" <NoS...@klaas.com> ha scritto nel messaggio

news:ezqhQ7Ys...@TK2MSFTNGP02.phx.gbl...

0 new messages