DropDownList changing the width

  • Thread starter Thread starter Garth
  • Start date Start date
G

Garth

Hi,
I have a drop down list and have set it's width to 200px.
But sometimes the text in the drop down list exceeds the 200px. This
cuts off the text thus the user cannot see the full description in the
text box. Is there any setting that will allow me to put it to default
to 200px if the text is smaller than 200px else to have it to use the
200px width?


Thanks
Garth
(e-mail address removed)
 
The only way around this is writing some really useless scripts that test for
the length of the strings in each option of the select and then calculates
some width. This is overkill for something so mundane as a select.

Best bet and easiest solution is to make the width just wide enough to
display the full text. Otherwise, use a radio list instead.

This is NOT an ASP.Net question...I dunno why you would even think to post
it here....
 
there is no way to do this. you really should not set a width for a
dropdown. while 200px may look ok on your machine, your clients may be using
different font sizes/ resolutions and see even less. the browser does not
support determine the text size of dropdown strings.

-- bruce (sqlwork.com)


| The only way around this is writing some really useless scripts that test
for
| the length of the strings in each option of the select and then calculates
| some width. This is overkill for something so mundane as a select.
|
| Best bet and easiest solution is to make the width just wide enough to
| display the full text. Otherwise, use a radio list instead.
|
| This is NOT an ASP.Net question...I dunno why you would even think to post
| it here....
|
| "Garth" wrote:
|
| > Hi,
| > I have a drop down list and have set it's width to 200px.
| > But sometimes the text in the drop down list exceeds the 200px. This
| > cuts off the text thus the user cannot see the full description in the
| > text box. Is there any setting that will allow me to put it to default
| > to 200px if the text is smaller than 200px else to have it to use the
| > 200px width?
| >
| >
| > Thanks
| > Garth
| > (e-mail address removed)
| >
 

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

Back
Top