开发者

In a fixed width <select multiple> html box, is there a way to see text options that are to long?

I have the following code:

<div id='div2' style='height: 430px; width: 350px; overflow:auto;'>
<select multiple id="id" size=开发者_StackOverflow社区"28" style="FONT-SIZE: 12px; FONT-FAMILY: Arial; width: 100%">

I cannot (due to requirements) increase the width of this box, its fixed at 350px. However some of the text strings in the box are larger then 350px; right now they are just being truncated but I was wondering if there was a way to either make these options wrap onto a second line, or add a horizontal scrollbar to the box in order to see the full options. I'm developing for IE7 and 8.


you can use css word-wrap: break-word;

click here for cross browser functionality

if it's the text inside the select list you want wrapped it's not possible as far as i know

what you could do is use a custom made selectbox for example the jQuery Selectmenu Where you can customize the look fully

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜