473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

format text in dropdownlist

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
Jul 27 '06 #1
3 6960
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" <No****@klaas.comha scritto nel messaggio
news:u6**************@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

Jul 27 '06 #2
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-mschreef in
bericht news:eN**************@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" <No****@klaas.comha scritto nel messaggio
news:u6**************@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


Jul 27 '06 #3
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" <No****@klaas.comha scritto nel messaggio
news:ez**************@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-mschreef
in bericht news:eN**************@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" <No****@klaas.comha scritto nel messaggio
news:u6**************@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



Jul 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Newgene | last post by:
Hi, group, I have python2.3 installed on win2k. I noticed that when I open a dos format text file (eol is '\r\n'), readline() always returns a line ending with '\n' only, not '\r\n'. While I read...
2
by: ezelasky | last post by:
We are using the bcp utility (via APIs) to export data from a SQL table in a fixed format text file. BCP is inserting spaces for a field if the field contains a NULL. This is fine with us except...
3
by: Rigga | last post by:
Hi all, Firstly, sorry for the simple question, as i'm sure i'm missing something obvious. I have a text field (varchar) I am reading from an SQL db, into a string variable, in .NET I am...
2
by: Jimmy | last post by:
How can i format text, so that user input such as, 01062004 would be formatted as 01/06/2004. I've tried several user-defined number and date formats, but I seem to be missing something. Thank...
1
by: cr113 | last post by:
How do I format text in datagrid column? I have a column of currency values and I want them all to display with 2 decimal points (XXX.XX). I figured out how to set the width and alignment as...
3
by: dennist685 | last post by:
Format text as a heading I'm progressing through a walkthrough on DetailsView control Early on it says Type Edit Employees, select the text, and then format the text as a heading. I clicked...
2
by: Rich | last post by:
Hello, I need to send an automated email message from my application (vb2005) - using system.net.mail. What I need to do to the message is to format the text, like underlining, bolding,...
2
by: =?Utf-8?B?am9obmFicmFoYW0xMDE=?= | last post by:
hello, I'm trying to write a some text to a text file using WriteAllText method. This method works fine but I don't understand how can I use format specifiers to format the text as we use in C i.e...
13
by: Neil Cerutti | last post by:
Many of the file formats I have to work with are so-called fixed-format records, where every line in the file is a record, and every field in a record takes up a specific amount of space. For...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.