Fix for IE select/option issue

C

code_berzerker

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?
 
D

david.karr

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.
 
C

code_berzerker

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.
 
D

David Mark

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.
 
C

code_berzerker

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.
 
D

David Mark

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?
 
C

code_berzerker

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).
 
R

Robin Rattay

[...]
<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
 
C

code_berzerker

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?
 
R

Robin Rattay

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
 

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,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top