Having some trouble aligning an image (which is contained in a div) and some text (also in a div) on the same line without setting a width for the text. Here's what I've tried so far.
<div id="container">
<div id="image" style="float:left;">
<img src="tree.png" align="left"/>
</div>
<div id="texts" style="float:left;">
A very long text (about 300 words)
</div>
</div>
When the text is short, both the image and text fit on the same line. However, when the text is long it jumps to another line below the image.
Currently looks like this: Looking to achieve this layout:
I've been struggling with this problem for about 3 hours now. Any help would be greatly appreciated!