Limiting width of password:   :: lost password

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

  •   Subject
  • Author
  • Posted on
How do I peg the width of the box generated by a <select> tag, clipping

<options> that're too long for it?  It's turning out to be difficult to

google for.

This is IE6, IE7, Safari.  IE7 is ignoring the "clip: rect{}" style.
Options are generated in code, so I could do a measure there and clip
by hand, but I wouldn't think I'd need to.


Re: Limiting width of box

Manny Klystron wrote:

Quoted text here. Click to load it

Errr... <SELECT style="width:120px;">

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Re: Limiting width of box

Thanks folks, I stupidly assumed <SELECT width="120px"> would do the
same, but IE7 does honor it in a style.  Unfortunately it doesn't honor
style="text-overflow:ellipsis", so the <option>s just get truncated.

And yes, this is for a fixed-width widget.  I didn't design it, and
it's for a small captive audience.

On that note, where's a good place to look for implementing spiffy
Google-style widget drag and drop?

Jukka K. Korpela wrote:
Quoted text here. Click to load it

Re: Limiting width of box

Gazing into my crystal ball I observed "Manny Klystron"

Quoted text here. Click to load it

There isn't much you can do for this.  You can try setting the width in
CSS, but that doesn't always work.  If the list is generated server
side, that's your best bet.  Actually, this is something I very rarely
worry about, if it's wide, it's wide, that's just the way the cookie
crumbles.  You might be able to move some other form elements around to
accomodate it.

Adrienne Boswell at Home
Arbpen Web Site Design Services
Please respond to the group so others can share

Site Timeline