Currently, I am facing an issue while dynamically appending div elements with the .magnet class to my page. These elements end up overflowing the container boundaries and I am struggling to find a solution for this problem. If anyone could check out my jsfiddle and provide assistance, I would be extremely grateful. The CSS code for the container is also included below. Explore JsFiddle Example
body {
margin:0 auto;
overflow:hidden;
}
#container {
background-color: #446b81;
}
.magnet {
width:45px;
background-color: #FFFFFF;
padding:5px 25px;
font-family: Times;
font-size: 16px;
border:1px outset;
position:absolute;
}