Is there any way to set the length/wdith of a select menu?

S

Shane Mingins

Hi

From what I have read there does not seem to be a way of setting the length
of a <SELECT> element.

I wish to have the selector box a certain length regardless of whether it is
empty or populated.

By default it sets itself to the length of the longest <OPTION> element.

Any tips to workaround this?

E.g Empy and Populated are the same length

Empty
__________________
|_________________V|

Populated
__________________
|_sdd_____________V|

Thanks
Shane

--
(e-mail address removed)

remove clothes before replying

"What are you famous for?" she asked.
"I am simply famous," he replied.
 
S

Sean Jorden

From what I have read there does not seem to be a way of setting the
length of a <SELECT> element.

E.g Empy and Populated are the same length

you can use CSS in this manner:

<select style="width:120px" >

However, be advised that even when the list items are shown, IE (only one I
have noticed) will chop off any text that goes over the width.


Sean
 
W

Woolly Mittens

Sean Jorden said:
However, be advised that even when the list items are shown, IE (only one I
have noticed) will chop off any text that goes over the width.

Which is a good thing if you have the kind of customers we do. They like
their titles long and boring.
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top