停止从图像周围的文本 [英] Stopping text from wrapping around image
本文介绍了停止从图像周围的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我摧毁了我的想法,想让这种造型做得正确。我有一个固定大小的图像与不可预测的高度div的文本在它的右边。我想让文本的顶部与图像的顶部对齐,但不要环绕它。我的标记是:
I am destroying my mind trying to get this styling done right. I have a fixed size image with an unpredictable height div of text to the right of it. I want the top of the text to line up with the top of the image but to NOT wrap around it. My markup is:
<img height='231px' width='132px' style='float:left' />
<div>Text</div>
我想找一个不涉及使用表格的解决方案,我不知道如何用css / divs做这个。
I would like to find a solution that doesn't involve using a table, but at the moment I am drained and can't think about how to do it with css/divs
推荐答案
>
This should do the trick.
<div style="margin-left: 132px">Text</div>
要在文本和图像之间留出空格,请使边距更大或添加 padding-left
。
To have space between the text and the image, make the margin larger or add a padding-left
.
这篇关于停止从图像周围的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文