How can I have foo fill the remainder of the container's width if there is at least 50px remaining. If foo is > 50px it moves to a new line increasing the container's height. This question HTML/CSS: Expanding a float-left element to remaining width of parent is the same. I refuse to believe this can't be done without javascript. Come at me bro.
.container {
width: 300px;
min-height: 30px;
overflow: auto;
}
.child {
float: left
}
.foo {
/* ? */
}
See Question&Answers more detail:os