I am facing an issue with a container div that contains multiple items. The container requires a border, but the problem arises when I float the elements left within the container, as it seems to disrupt the flow of the elements.
Adding a border to the container does not outline all the elements as if they are not contained within it.
<div class="container">
<div class="one"></div>
<div class="one"></div>
<div class="one"></div>
<div class="one"></div>
<div class="one"></div>
<div class="one"></div>
<div class="one"></div>
<div class="one"></div>
</div>
.one {
width:150px;
height:50px;
background:red;
margin:5px;
float:left;
}
.container {
width:350px;
border-style:solid;
border-width:2px;
border-color:black;
}
View the issue here: http://jsfiddle.net/ynwbzw97/
Any suggestions on how to resolve this problem?