By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

Fix for IE select/option issue

P: n/a
Hi

Does any of you know how to fix issue with IE and fixed size select
which in result cuts content of all option values to the width of
select element?
Aug 4 '08 #1
Share this Question
Share on Google+
11 Replies


P: n/a
any1 anything?

Aug 6 '08 #2

P: n/a
On Aug 4, 5:47*am, code_berzerker <emen...@gmail.comwrote:
Hi

Does any of you know how to fix issue with IE and fixed size select
which in result cuts content of all option values to the width of
select element?
Try giving a detailed example and someone might be able to help you.
Aug 6 '08 #3

P: n/a
On Aug 6, 10:24*pm, "david.karr" <davidmichaelk...@gmail.comwrote:
On Aug 4, 5:47*am, code_berzerker <emen...@gmail.comwrote:
Hi
Does any of you know how to fix issue with IE and fixed size select
which in result cuts content of all option values to the width of
select element?

Try giving a detailed example and someone might be able to help you.
[...]
<select style="width: 50px;">
<option>Very very very very very very very very very very very very
very long text</option>
</select>
[...]

If you click on select to pick the option it will be truncated to
select size instead of having its own size. Try FF or Opera to see
what it should look like.
Aug 7 '08 #4

P: n/a
On Aug 7, 4:34*am, code_berzerker <emen...@gmail.comwrote:
On Aug 6, 10:24*pm, "david.karr" <davidmichaelk...@gmail.comwrote:
On Aug 4, 5:47*am, code_berzerker <emen...@gmail.comwrote:
Hi
Does any of you know how to fix issue with IE and fixed size select
which in result cuts content of all option values to the width of
select element?
Try giving a detailed example and someone might be able to help you.

[...]
<select style="width: 50px;">
<option>Very very very very very very very very very very very very
very long text</option>
</select>
[...]

If you click on select to pick the option it will be truncated to
select size instead of having its own size. Try FF or Opera to see
what it should look like.
Should according to whom?

Regardless, if you don't like the behavior in IE, feature test for it
and then adjust the width of the select in a click listener.
Aug 7 '08 #5

P: n/a
Regardless, if you don't like the behavior in IE, feature test for it
and then adjust the width of the select in a click listener.
Thought of doing that, but wouldnt that force-resize elements that
contain this select? This is the thing I wish to avoid most.
Aug 7 '08 #6

P: n/a
On Aug 7, 5:15*am, code_berzerker <emen...@gmail.comwrote:
Regardless, if you don't like the behavior in IE, feature test for it
and then adjust the width of the select in a click listener.

Thought of doing that, but wouldnt that force-resize elements that
contain this select? This is the thing I wish to avoid most.
That would depend very much on the style of those elements. What
happens in FF and Opera?
Aug 7 '08 #7

P: n/a
On Aug 7, 11:20*am, David Mark <dmark.cins...@gmail.comwrote:
On Aug 7, 5:15*am, code_berzerker <emen...@gmail.comwrote:
Regardless, if you don't like the behavior in IE, feature test for it
and then adjust the width of the select in a click listener.
Thought of doing that, but wouldnt that force-resize elements that
contain this select? This is the thing I wish to avoid most.

That would depend very much on the style of those elements. *What
happens in FF and Opera?
Default behaviour of FF and Opera in above example is that select has
correct width and options are of width of longest option element (all
text fits / is visible).
Aug 7 '08 #8

P: n/a
On 7 Aug., 10:34, code_berzerker <emen...@gmail.comwrote:
[...]
<select style="width: 50px;">
<option>Very very very very very very very very very very very very
very long text</option>
</select>
[...]

If you click on select to pick the option it will be truncated to
select size instead of having its own size. Try FF or Opera to see
what it should look like.
As David asked: "Should according to whom?"

The only solutions are either not to set a width, or not to use a
select element.

Robin
Aug 7 '08 #9

P: n/a
The only solutions are either not to set a width, or not to use a
select element.
How about onclick-placing new select postioned over the original,
being its copy and without size and after onchange set value to
original and remove floating select duplicate?
Aug 7 '08 #10

P: n/a
On 7 Aug., 13:47, code_berzerker <emen...@gmail.comwrote:
The only solutions are either not to set a width, or not to use a
select element.

How about onclick-placing new select postioned over the original,
being its copy and without size and after onchange set value to
original and remove floating select duplicate?
Unlikely.

a) IE is really bad in overlapping SELECT-Elements.
b) There is no reliable way to know when the select element has been
"opened".

Robin
Aug 7 '08 #11

P: n/a
Robin Rattay wrote:
On 7 Aug., 13:47, code_berzerker <emen...@gmail.comwrote:
>>The only solutions are either not to set a width, or not to use a
select element.
How about onclick-placing new select postioned over the original,
being its copy and without size and after onchange set value to
original and remove floating select duplicate?

Unlikely.

a) IE is really bad in overlapping SELECT-Elements.
For which the reason is that MSHTML uses a windowed control for `select'
elements:

<http://www.dotnetjunkies.com/WebLog/jking/archive/2003/07/21/488.aspxpp.
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Aug 7 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.