Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with <select> tag appreciated

Status
Not open for further replies.

Maim

Programmer
Jun 25, 1999
106
CA
Kinda new to the fancier tricks one can do with html, so here's my question.

I have a page which displays a seried of <select> combo boxes each having diffeent <options>
To keep the width uniform I'm using style=&quot;width:150px&quot; in each <select>

ex.
<select name=&quot;bla_0&quot; style=&quot;width:150px&quot;>

I would like to know if it's at all possible for the list when selecting to resize? If I have items that have names longer than what 150px permits, I'd like the user to be able to see the name completely when scrolling the list.

example
[tt]
select: |---------------|
option1 |My mother and your mother were yadda yadda|
option2 |The ferrari F-40 is worth around a million|
option3 |You get my point? |
[/tt]
currently it looks like
[tt]
select: |---------------|
option1 |My mother and y|
option2 |The ferrari F-4|
option3 |You get my poin|
[/tt]
Again, I don't want to have the selects with different widths. &quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.&quot; - Rich Cook
 
You could try something like this:

<Select id=test style=&quot;width:150px&quot; onfocus=&quot;javascript: this.style.width='250px';&quot; onblur=&quot;javascript: this.style.width='150px';&quot;>

Though it's not the best functionality. &quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
Actually, it works a little better with onmouseover and onmouseout, but again, the onmouseout is fired as soon as I move my cursor out of the area where the select is located.

Oh well, I'll post here if I find a solution... &quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.&quot; - Rich Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top