开发者

C# asp:ListBox hide vertical scrollbar

How to hide the vertical scroll bar of a Listbox that is present inside a div.

<div id="lstQueriesDiv" style="overflow-y: hidden !impor开发者_如何转开发tant; overflow-x: auto !important;
         Width: 650px; height:167px;" > 
 <asp:ListBox ID="lstQueries" runat="server" CssClass="cssLstQueries" Rows="9"></asp:ListBox>
</div>

css:

    .cssLstQueries{
    Width:auto;
    }

I want to hide the vertical scrollbar of the listbox not the the vertical scrollbar of the div.


Remove OVERFLOW:auto; from

<div id="lstQueriesDiv" style="OVERFLOW:auto; Width: 650px; height:167px;" > 

because it's overwriting the CSS class where you have overflow: hidden;


set the scrollbars in your object properties

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜