I am using div container as a drop-able element, so I am adding buttons elements dynamically in to this div container. Div size is resizing if I am adding buttons beyond its size how to avoid this?
Note: This issue occurs in Firefox only
#divContainer{
width:100%;
height:40%;
overflow:auto;
border:1px solid;
display:inline-block;
}
#click{
width:100px;
height:30px;
}
table{
border:1px solid;
}
body{
height:1000px;
}
//html
<button id="click">ClickME</button>
<table style="width:20%; height:30%">
<tr>
<td>
<div id="divContainer">
</div>
</td>
</tr>
</table>
//script
$(function () {
$("#click").on("click", function () {
$("#divContainer").append($("#click").clone());
});
});