I'm trying to give height
and overflow-y
to div
to limit the size of div
and add a scroll.
Something like this:
ForthisIamloadingalistofdatacomingfromDB(IamworkingonASPMVC)inthediv,andIaddtheheight
andtheoverflow-y
init:
<divid="divListaEstabs" style="height: 60%; overflow-y: scroll;">
<input type="checkbox" id="selectall">Seleccionar todos
<br />
@foreach (var item in ViewBag.estabelecimentos)
{
<input type="checkbox" value="@item.IdFilial" name="filialCopia"/>@item.Nome<br />
}
</div>
Problem?
The scroll is added to the div, but it is not limited in height, increasing the size of the page (as shown in the image):