Drop-Down List Justification?

G

George

VS.NET 2002/VB

Is there any way to right justify the items in a drop-down list?

I have a list of fractions -- in 1/8 and 1/16 -- and they look kind of funky being left justified,
especially since the 16's get wider and wider as you go down the list.

I've tried padding the 1/8s with spaces to move them over a little, but spaces don't seem to hold in
a list.

Thanks,
George
 
M

Martin Dechev

Hi, George,

For simple cases like list of numbers you can set the css property
"direction" to "rtl" (right to left). A side effect is that the dropdown
button goes to the left end of the control which may surprise or even
frighten users. Anyway, try experimenting with it.

<asp:dropdownlist id="dropDownList1" runat="server"
style="direction:rtl;"/>

If there is enough space in the page and the items are not that many I'd
rather use RadioButtonList with RepeatLayout table, RepeatDirection vertical
and TextAlign right.

Greetings
Martin
 
G

George

Martin,

I really didn't think there was any way to do it, so I'll play around with your suggestion a little.

Thanks,
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top