我没有问题让文本环绕一个div,当元素的顶部对齐时,但我不知道如何让文本在div上方和下方换行。
例如,我希望文本在40px的#container宽度内,然后向右环绕它,再次完全宽度。
请在http://jsfiddle.net/cope360/wZw7T/1/查看示例。 我在#inset中添加的上边距是我希望文本换行的位置。这可能吗?
CSS:
#inset {
width: 100px;
height: 100px;
background: gray;
float: left;
margin-top: 40px;
}
HTML:
<div id="container">
<div id="inset">Inset</div>
This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around. This text should wrap all around.
</div>