How to add a vertical scroll bar to a CheckBoxList Server control in ASP.NET

M

Marshal Antony

How to add a vertical scroll bar to a CheckBoxList Server control in
ASP.NET.

Any help is appreciated.

Thanks,

Marshal Antony
 
A

Alessandro Zifiglio

hi Marshal, the CheckboxList control outputs tables. Tables dont support the
overflow CSS property. What you can do is wrap the control within div tags
and set the style of the div tags overflow property to auto like this :<div
style="overflow: auto;height:100px;width:200px;">
<asp:CheckBoxList id="CheckBoxList1" runat="server"></asp:CheckBoxList>
</div>

Now if the width of your checkboxList exceeds the height of your div, that
is 100px you get vertical scrollbars and if the width exceeds 200px you have
horizontal scrollbars.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top