我在一个页面上有两个 div,其中一个浮动在右侧。我在不浮动的 div 上设置了最小宽度。当我缩小浏览器窗口时,浮动 div 会按预期侵入非浮动 div,但会继续超过最小宽度并开始将非浮动 div 中的所有文本向下推。如何阻止浮动 div 移动超过某个点?我在下面包含了示例代码。
<html>
<head>
<style type="text/css">
#one
{
border: 1px red dotted;
margin-right: 500px;
min-width: 250px;
}
#two
{
border: 1px red dotted;
float: right;
width: 450px;
}
</style>
</head>
<div id="container">
<div id="two">
This is a floating div.
</div>
<div id="one">
This div is not floating and has a whole bunch of text inside of it.
</div>
</div>
</html>