so I am trying to make a divs height automatically adjust based on the height of the content inside it. This is my current work:
<div id="content">
<div id="item"></div>
<div id="item"></div>
<div id="item"></div>
<div id="item"></div>
<div id="item"></div>
<div id="item"></div>
<div id="item"></div>
</div>
#content {
margin: 0px auto;
margin-top: 10px;
border: 1px solid;
width: 920px;
}
#item {
display: block;
width: 220px;
height: 250px;
border: 1px solid;
margin-left: 6px;
margin-bottom: 5px;
float: left;
}
I have discovered that when I am NOT applying 'float: left' to the 'item' divs that it does work, however when I do apply float: left the height is not being set based on the content inside. Any idea on how to fix this?