width of select tag

H

huzefa

Hi,
I want to control the width of drop-downs on my page.
That is, in case the size of the text is too large then the entire
text should only be shown on clicking the combo box.
Any one has any idea as to how this can be done.
I tried style="Width:100px" ... this truncates the text beyond the
specified width.
I dont want that to happen.
Please help.
Huzefa
 
S

Steve Pugh

I want to control the width of drop-downs on my page.
That is, in case the size of the text is too large then the entire
text should only be shown on clicking the combo box.
Any one has any idea as to how this can be done.

Universally, it can't. Some OS/browser combinations use the same width
for the always visible box and the expanded list. Others will use
different widths.
I tried style="Width:100px" ... this truncates the text beyond the
specified width.

In some browsers it does, in others it does not.

There's no way of confining the width of the always visible box
without confining the width of the expanded list in at least some
browsers.

Shorten the text in the list or rethink your design so that it is more
flexible and allows for variously sized select boxes.

Steve
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top