So I am making a row of items in a semi elastic container. There is a profile image on the left, and then content floated to the right of it (both float left).
What I am trying to do is make the content float be max possible width instead of min possible width (as floating causes).
CSS:
#container {
max-width: 800px;
min-width: 500px;
}
.profile {
float: left;
width: 100px;
}
.info {
float: left:
min-width: 400px;
max-width: 700px;
}
HTML:
<div id="container">
<div class="profile">
IMG
</div>
<div class="info">
INFO
</div>
</div>
It doesn’t make much sense to float something when you want it to expand to fill the parent. Just remove the
float: leftand the width properties from the.infodivision so that it will expand to fill the width of the parent and then add amargin-left: 100pxto push it out from under the one that is still floated to the left.