Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
411 views
in Technique[技术] by (71.8m points)

javascript - How to show extended option in select list?

While using fixed width select tag , there is one bug in IE. When the content of the option in the select tag is more than the width of select tag its hide. Its working fine in fire fox , not in IE.

alt text http://img691.imageshack.us/img691/4530/dropdown.gif

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is a bug in IE, and there is no way to solve it, apart from making the select box wider:

<select style="width: 500px;">
  <option value="1">
    This is a very long option, but it's cool, cause the select is also very long
  </option>
</select>

Another alternative is to use a framework that will replace the selectbox with a styled combination of other elements. They will behave like a selectbox, but require javascript to work.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...