为CheckBoxList启用水平滚动条 [英] enable the horizontal scroll bar for the CheckBoxList

查看:167
本文介绍了为CheckBoxList启用水平滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PFB代码

PFB the code

<div style="width: 300px; height:284px; border-color: Black; border-width:1px; border-style:solid; overflow:auto; font-family:Palatino Linotype; font-size:13.3333px; font-weight: 400; font-style: normal; word-wrap:normal;">
            <asp:CheckBoxList ID="cblSteps" runat ="server" style="width:auto"></asp:CheckBoxList>
            </div>



问候,
-Prashant



Regards,
-Prashant

推荐答案

将其放入div.

Put it in a div.

<div id="Layer1" style="position:relative;width:350px;height:200px;
overflow:scroll;">
<asp:CheckBoxList ID="cblSteps" runat ="server" style="width:auto"></asp:CheckBoxList></div>



祝你好运!



Good luck!


您确定尝试正确吗?您是否使用overflow:scroll而不是overflow:auto?这应该工作...
还要检查您的CSS样式,也许您已经为CheckBoxList设置了绝对位置...

Are you sure you tried it correctly? Did you use overflow:scroll instead of overflow:auto? This should work...
Also check your css styles, maybe you have set Absolute position for your CheckBoxList...

<div style="width:100px; height:50px; overflow:auto">
        <asp:CheckBoxList ID="CheckBoxList1" runat="server">
        <asp:ListItem>A</asp:ListItem>
        <asp:ListItem>B</asp:ListItem>
        <asp:ListItem>C</asp:ListItem>
        <asp:ListItem>D</asp:ListItem>
        <asp:ListItem>E</asp:ListItem>
        <asp:ListItem>F</asp:ListItem>
        </asp:CheckBoxList>
</div>


这篇关于为CheckBoxList启用水平滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆