Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Text alignment in DropDownList

Reply
Thread Tools

Text alignment in DropDownList

 
 
Russ
Guest
Posts: n/a
 
      07-12-2004
I'm trying to figure out how to cause the items in a DropDownList to
be right justified. This is a dynamically created list. Here is what
I have tried:

DropDownList List = new DropDownList ();
List.Style.Add ("Position", "Absolute");
List.Style.Add ("Left", "10px");
List.Style.Add ("Top", "320px");
List.Style.Add ("text-align", "right");

This does not work. I found some info that there is a bug in the
framework that causes this failure and to use the following instead:

List.DataSource = TextArray;
DedList.DataBind ();
foreach (ListItem item in List.Items)
{
item.Attributes.Add ("style", "text-align:right");
}

This does not work either. Can anyone tell me what to do?

Thanks, Russ

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text field text alignment Karsten Wutzke HTML 5 12-14-2006 11:09 PM
Checkbox Text Alignment =?Utf-8?B?QmFobWFu?= ASP .Net 3 02-09-2006 10:00 PM
Checkbox text alignment tshad ASP .Net 0 03-07-2005 10:25 PM
Easy text alignment in Frontpage question. Pete HTML 6 03-05-2004 09:34 PM
Text Alignment FluxForums HTML 29 02-23-2004 11:42 AM



Advertisments