我有以下标记:
<li id="CN2787">
<img class="fav_star" src="images/fav.png">
<span>Text, text and more text</span>
</li>
我希望文字折行时不会进入图像所在的“列”。我知道可以使用 table
来实现(我以前是这样做的),但由于这个原因,这种方式不可行。
我尝试了以下方法,但没有成功:
li span {width: 100px; margin-left: 20px}
.fav_star {width: 20px}
我也尝试了 float: right
。
谢谢。
编辑:我希望它看起来像这样:
IMG Text starts here and keeps going... and
wrap starts here.
不要这样:
IMG Text starts here and keeps going... and
wrap starts in the space left for the image.