height of the dropdown box display [duplicate]
Possible Duplicate:
adjust the height of the list in dropdown box
hi
how can I adjust the height of the list in the dropdown because I have too many values loaded in the drop down box. For example, it only show 10 entries, and with scro开发者_运维问答llbars to see remaining. does anyone know how to do that? you may more clear to see my attached picture.
this is what I want. it only show 5 entries, and with scrollbars to see remaining.
You can not actually control the size of the dropdown box if you are using HTML . There are some ways to fake it using divs and scroll bars, but that is different
This is not easy, and requires several nested CSS styles and some Javascript but the HTML is below. It basically operates like a SharePoint style dropdown box, with some over effects and on click opens the scrolling options.
<table cellspacing="0" cellpadding="0" class="spsItems">
<tbody>
<tr contextmenuid="options-aaa" class="people_display">
<td class="spsContext">Current Option</td>
</tr>
<tr contextmenuid="options-bbb" class="people_display">
<td class="spsContext">Current Option</td>
</tr>
<tr contextmenuid="options-bbb" class="people_display">
<td class="spsContext">Current Option</td>
</tr>
</tbody>
</table>
<div id="options-aaa" class="spsContextMenu" >
<ul>
<li>Option Value</li>
<li>Option Value</li>
.....
<li>Option Value</li>
<li>Option Value</li>
</ul>
</div>
精彩评论