Mixing font styles in a dropdownlist

  • Thread starter Thread starter Nicolas Verhaeghe
  • Start date Start date
N

Nicolas Verhaeghe

I have a request for a drop-down mixing font style in one of my Web
forms.

Basically, each option item has to be in normal style, up to the
middle where the style needs to be italic.

For instance (in old school HTML):

Choice 1 - <i>legend 1</i>
Choice 2 - <i>legend 2</i>
Etc...

Of course the <i> will not be interpreted and will show as is.

I believe this is something I can do with style sheets.

I am using FW 3.5, and coding in C#, using a drop down list.
 
I have a request for a drop-down mixing font style in one of my Web
forms.

Basically, each option item has to be in normal style, up to the
middle where the style needs to be italic.

For instance (in old school HTML):

Choice 1 - <i>legend 1</i>
Choice 2 - <i>legend 2</i>
Etc...

Of course the <i> will not be interpreted and will show as is.

I believe this is something I can do with style sheets.

I am using FW 3.5, and coding in C#, using a drop down list.

Drop-down control cannot mix styles. You can make a control that can
look like a standard drop-down. Here's an example of how to make
multiple columns list: http://www.codeproject.com/KB/custom-controls/multiColsDD_List.aspx

I think you can re-use that code and make second column shown in italic
 
Thanks, Alexey. I believe this would not work because it would mean
aligning the second part of the text in a second column, while they
want it all flush.

The grid solution would be the closest to what could be done but in
this case this would not accommodate the client's request (which I
think he will not insist about).

Thanks for the help!
 
Thanks, Alexey. I believe this would not work because it would mean
aligning the second part of the text in a second column, while they
want it all flush.

The grid solution would be the closest to what could be done but in
this case this would not accommodate the client's request (which I
think he will not insist about).

Thanks for the help!

the idea behind that control is to use a layer (div) to show list of
entries as a grid (to build multiple columns). I agree you don't need
the grid but you can still use the stuff with the layer. I will try to
find an example without ASP.NET
 
Back
Top