HighDots Forums  

select/option tags and formatting

alt.html.tags alt.html.tags


Discuss select/option tags and formatting in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael G
 
Posts: n/a

Default select/option tags and formatting - 08-20-2005 , 12:13 AM






Is there any way to format text within a option tag. I have tried a variety
of thing but
all seem to be a hack. I want and like the ability to select items from a
list because is
seems so natural but getting them to look like something has been a bit of a
challenge
to say the least.

<select>
<option>CS 445 3 Fall 2005</option>
<option>ENEX 333 2 Fall 2005</option>
....
</select>

Looks like this (maybe a little exaggerated)
CS 445 3 Fall 2005
ENEX 333 2 Fall 2005

I am using a fixed width font so that helps a little but...I have found no
way, except
&nbsp; (which I don't like), to get some consistent spacing between the
strings in
the option tag.

What I would like is this, with the ability to select one or more.

CS 445 3 Fall 2005
ENEX 333 2 Fall 2005


Thanks for any help.
Mike




http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: select/option tags and formatting - 08-20-2005 , 03:43 AM






"Michael G" <mike-g (AT) montana (DOT) com> wrote:

Quote:
Is there any way to format text within a option tag.
Basically no.

Quote:
I have tried a
variety of thing but
all seem to be a hack.
Then select another option (pun intended), i.e. use a different approach.
Instead of a select element, use a set of radio buttons, as described at
http://www.cs.tut.fi/~jkorpela/forms...#select-inflex

Quote:
select
option>CS 445 3 Fall 2005</option
option>ENEX 333 2 Fall 2005</option
...
/select
Looks like tabular material, so make it a table, with a radio button in the
first column.

(This would also let you e.g. make "CS", "ENEX", etc., links to
explanations, for those you might not guess what they mean.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #3  
Old   
Michael G
 
Posts: n/a

Default Re: select/option tags and formatting - 08-20-2005 , 08:57 AM




"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote

Quote:
"Michael G" <mike-g (AT) montana (DOT) com> wrote:

Is there any way to format text within a option tag.

Basically no.
You would think that such a use control would have evolved.
I guess Darwin is wrong.

Quote:
I have tried a
variety of thing but
all seem to be a hack.

Then select another option (pun intended), i.e. use a different approach.
Instead of a select element, use a set of radio buttons, as described at
http://www.cs.tut.fi/~jkorpela/forms...#select-inflex
Yeah or maybe I can build my own.


Quote:
Looks like tabular material, so make it a table, with a radio button in
the
first column.

I would need checkboxes with an option to select all. I don't think you can
use the shift or ctrl keys to select en masse.

I did some searching last night on Google groups. Seems you have addressed
this issue many times before. :-)

Thanks for your help.
Mike




http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: select/option tags and formatting - 08-20-2005 , 11:03 AM



"Michael G" <mike-g (AT) montana (DOT) com> wrote:

Quote:
Is there any way to format text within a option tag.

Basically no.

You would think that such a use control would have evolved.
I guess Darwin is wrong.
Darwin is wrong - about HTML.

Quote:
I would need checkboxes with an option to select all. I don't think you
can use the shift or ctrl keys to select en masse.
You can't, but such a feature works poorly in select elements, too. Few
people know about it, and it takes care to select right.

If selecting all is something that you would expect people to want to do
often (but you you don't want to make it default), you could add a button
that selects all, using JavaScript. If you generate markup for the button
dynamically, it won't disturb when JavaScript is off.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #5  
Old   
Jim Michaels
 
Posts: n/a

Default Re: select/option tags and formatting - 02-03-2006 , 03:53 AM




"Michael G" <mike-g (AT) montana (DOT) com> wrote

Quote:
Is there any way to format text within a option tag. I have tried a
variety of thing but
all seem to be a hack. I want and like the ability to select items from a
list because is
seems so natural but getting them to look like something has been a bit of
a challenge
to say the least.

select
option>CS 445 3 Fall 2005</option
option>ENEX 333 2 Fall 2005</option
...
/select

Looks like this (maybe a little exaggerated)
CS 445 3 Fall 2005
ENEX 333 2 Fall 2005

I am using a fixed width font so that helps a little but...I have found no
way, except
&nbsp; (which I don't like), to get some consistent spacing between the
strings in
the option tag.
you are going to have to use &nbsp; to get your spacing. but, you can also
use CSS to get your font formatting...

<select multiple name="class" style="font-family:Courier New,Courier,mono;">
<option><pre>CS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;445&n bsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;Fall&nbsp;&nbsp ;&nbsp;2005</pre></option>
<option><pre>ENEX&nbsp;&nbsp;&nbsp;333&nbsp;&nbsp; &nbsp;2&nbsp;&nbsp;&nbsp;Fall&nbsp;&nbsp;&nbsp;200 5</pre></option>
...
</select>

I suggest you give the user the option to repeatedly "add" classes to some
sort of internal list/db table, even if they multi-select to save time.
they will probably be more grateful for it.

Quote:
What I would like is this, with the ability to select one or more.

CS 445 3 Fall 2005
ENEX 333 2 Fall 2005


Thanks for any help.
Mike


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption
=----



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.