好的,所以我试图在同一行上对齐图像(包含在 div 中)和一些文本(也包含在 div 中),而不为文本设置宽度,我该怎么做?这就是我到目前为止所拥有的。
<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>
当文本很短时,图像和文本可以放在同一行,但我的文本很长,它会自动跳到图像下方的另一行。
基本上,现在是这样的:http: //puu.sh/MPw2 我想做这个: http: //puu.sh/MPvr
我一直在尝试解决这个问题 3 个小时,我太菜鸟了,请帮忙?:S