Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Tabs in a Select list?

Reply
Thread Tools

Tabs in a Select list?

 
 
Martin
Guest
Posts: n/a
 
      04-18-2006
Is there any way I can get a drop-down list in a Select tag to display
it's contents in two columns? Say, for example, I wanted to display a
list of people's names with the last name aligned to the left side and
the first name aligned to the center.

Maybe a tab character between them?

I've tried a couple of things but I can't get anything to work.



 
Reply With Quote
 
 
 
 
Jim Moe
Guest
Posts: n/a
 
      04-19-2006
Martin wrote:
> Is there any way I can get a drop-down list in a Select tag to display
> it's contents in two columns? Say, for example, I wanted to display a
> list of people's names with the last name aligned to the left side and
> the first name aligned to the center.
>

select, option {
white-space: pre;
font-family: monospace;
}
The whitespace in the <select> is still collapsed but at least the
<option>s align like you would like. The backend processor decides how
many spaces to put in the list to get it to look columnar.
The font has to be monospace, else the spacing does not work like you
expect.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
 
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
Tabs -vs- Spaces: Tabs should have won. rantingrick Python 95 07-18-2011 11:07 PM
select gridview row without using select button? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 5 02-27-2009 02:56 AM
CSV::Writer... Using tabs instead of commas (or creating excel file using tabs to seperate data) John Kopanas Ruby 2 01-29-2007 06:26 PM
List text files showing LFs and expanded tabs (was: Colorize expanded tabs) qwweeeit Python 2 12-14-2005 10:07 AM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM



Advertisments