質問

If we have a simple HTML drop down list with about 10 items and item at the end or near end as default selection. Behavior is different in both FF and IE.

In FF, list is rendered with default value displayed and when list down icon is clicked to expand, the whole list drops downwards and default value at last selected. This is good behavior.

But in IE, for same items, list drops upwards with the last value as default selection and at same level as drop-down field.

Similarly, if n-1 item is default, FF opens downwards and n-1 selected. But IE, opens upwards with (n-1)th at same level and nth below.

Is it known behavior and any if we have any alternatives or workarounds to make drop-down look consistent.

役に立ちましたか?

解決

This is the built-in behaviour of the SELECT tag. You cannot change this.

If you want it to behave differently you need to replace it with a JavaScript-based solution that emulates a drop-down.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top