From: sean on
SELECT drop-list width incorrect for long text when SELECT is fixed width
Setting the width style of a SELECT statement causes the contents of the
drop-list to be cropped.

This is problematic when attempting to limit the width of the select box for
layout purposes (say, a fixed-dimensions application UI) whilst still
presenting the user with all of the required information to make a choice.

Any clue to solve the above issue is highly appreciated!




From: Randy Webb on
sean said the following on 1/11/2006 10:34 PM:
> SELECT drop-list width incorrect for long text when SELECT is fixed width
> Setting the width style of a SELECT statement causes the contents of the
> drop-list to be cropped.

What do you think it *should* do? You tell it to set it at a width, and
then you complain that it does just that? Thats not a bug, that is doing
what you told it to do.

> This is problematic when attempting to limit the width of the select box for
> layout purposes (say, a fixed-dimensions application UI) whilst still
> presenting the user with all of the required information to make a choice.
>
> Any clue to solve the above issue is highly appreciated!

Ummm, ehhh, what does this have to do with Javascript?

comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.stylesheets

Might be better groups to ask in.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
From: sean on
Thanks for the info. But in FireFox the dropdown menu part will
automatically extend to fit the width of the long text without change the
width of the combobox part. I recall seeing a javascript hack somewhere to
solve this problem by openning a popup that masks the original dropdown and
adjust the text width in the popup... Well, I guess I have to find it myself
and show it here..

Thanks!


"Randy Webb" <HikksNotAtHome(a)aol.com> wrote in message
news:6JadnbqEXb1_cVjeRVn-sg(a)comcast.com...
> sean said the following on 1/11/2006 10:34 PM:
>> SELECT drop-list width incorrect for long text when SELECT is fixed width
>> Setting the width style of a SELECT statement causes the contents of the
>> drop-list to be cropped.
>
> What do you think it *should* do? You tell it to set it at a width, and
> then you complain that it does just that? Thats not a bug, that is doing
> what you told it to do.
>
>> This is problematic when attempting to limit the width of the select box
>> for layout purposes (say, a fixed-dimensions application UI) whilst still
>> presenting the user with all of the required information to make a
>> choice.
>>
>> Any clue to solve the above issue is highly appreciated!
>
> Ummm, ehhh, what does this have to do with Javascript?
>
> comp.infosystems.www.authoring.html
> comp.infosystems.www.authoring.stylesheets
>
> Might be better groups to ask in.
>
>
> --
> Randy
> comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
> Javascript Best Practices -
> http://www.JavascriptToolbox.com/bestpractices/


From: Randy Webb on
sean said the following on 1/13/2006 1:44 AM:

Please do not top-post in comp.lang.javascript

> Thanks for the info. But in FireFox the dropdown menu part will
> automatically extend to fit the width of the long text without change the
> width of the combobox part.

Then I would consider that a bug in FireFox's CSS Support if it is not
honoring your CSS Definition to set it at a particular width.

But, if you want the Select to be a certain minimum width and then to
expand if need be but do not shrink below that width, then you pad one
of the Select Elements:

<option value="1">Option Text&nbsp;&nbsp;&nbsp;&nbsp;</option>
Add more spaces to make it the width you want.

> I recall seeing a javascript hack somewhere to solve this problem by openning a
> popup that masks the original dropdown and adjust the text width in the popup...

You want to open a popup, well at least try to, to mask an original
dropdown select list instead of padding an Option or simply not
declaring a width? All because Firefox doesn't follow the CSS Code you
give it?

That wouldn't be a "hack", that would be insanely ludicrous.

That still is not an "IE Bug" but rather a "Firefox Bug".

> Well, I guess I have to find it myself and show it here..

That would be interesting just to show how it is utterly insane and useless.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
From: Jasen Betts on
On 2006-01-13, Randy Webb <HikksNotAtHome(a)aol.com> wrote:
> sean said the following on 1/13/2006 1:44 AM:
>
> Please do not top-post in comp.lang.javascript
>
>> Thanks for the info. But in FireFox the dropdown menu part will
>> automatically extend to fit the width of the long text without change the
>> width of the combobox part.
>
> Then I would consider that a bug in FireFox's CSS Support if it is not
> honoring your CSS Definition to set it at a particular width.

the dropdown is mmade of <options> it may hase be that firefox just has a
different policy for the width of the options and how to handle overflow...

set an explicit width for option,
and also overflow: hidden ; padding-right:20px

> But, if you want the Select to be a certain minimum width and then to
> expand if need be but do not shrink below that width, then you pad one
> of the Select Elements:

??? you could just use CSS to set the minimum width.....

> That still is not an "IE Bug" but rather a "Firefox Bug".

it mak be able to fix the IE behavior using CSS
(possibly "option {overflow:visible;})

I can't be bothered to try.

Bye.
Jasen