Home All Groups Group Topic Archive Search About
Author
27 Jul 2006 1:24 PM
Klaas
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

Author
27 Jul 2006 2:18 PM
Alessandro Zifiglio
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

Show quoteHide quote
"Klaas" <NoSpam@klaas.com> ha scritto nel messaggio
news:u6bgz$XsGHA.3952@TK2MSFTNGP03.phx.gbl...
> 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
>
Author
27 Jul 2006 3:10 PM
Klaas
Thanks for the answer. So it's not possible for IE...:-(
To bad.



Show quoteHide quote
"Alessandro Zifiglio" <AlessandroZifiglio @ -h-o-t-m-a-i-l-c-o-m> schreef in
bericht news:eNdWaeYsGHA.4748@TK2MSFTNGP03.phx.gbl...
> 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" <NoSpam@klaas.com> ha scritto nel messaggio
> news:u6bgz$XsGHA.3952@TK2MSFTNGP03.phx.gbl...
>> 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
>>
>
>
Author
27 Jul 2006 3:39 PM
Alessandro Zifiglio
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

Show quoteHide quote
"Klaas" <NoSpam@klaas.com> ha scritto nel messaggio
news:ezqhQ7YsGHA.4992@TK2MSFTNGP02.phx.gbl...
> 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:eNdWaeYsGHA.4748@TK2MSFTNGP03.phx.gbl...
>> 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" <NoSpam@klaas.com> ha scritto nel messaggio
>> news:u6bgz$XsGHA.3952@TK2MSFTNGP03.phx.gbl...
>>> 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
>>>
>>
>>
>
>