I want this result:
LEFT THING, not fixed here comes a text, which is 100% widthed in this "column"
width (content itself but my problem is, when its too long, this column goes under the
determines that) left column, so not left floated. I also want this text go and
go under and under, but normally, THIS LINE would continue under
the left column, which I dont want to. Its like table element
but its still considered bad for this situations :/
the DIV construction:
<div style="float: left">LEFT THING</div>
<div style="float: left">here comes a text, which...</div>
how to solve it?
Floated elements with
width: autoare sized using the shrink-to-fit algorithm. That is, they attempt to grow as much as their content wants.To avoid this, you should limit the width, e.g. by setting an explicit
widthor an upper bound withmax-width.Then, to make the following block grow to fill the remaining space, you should let it have the default
float: noneandwidth: auto, and establish a Block Formatting Context (BFC) to prevent it from overlapping the float.