Html CSS,2个div,1个扩展1个已修复,但需要换行

Html CSS,2个div,1个扩展1个已修复,但需要换行,html,css,Html,Css,我有两个div,我需要两个div的最小大小都在300px左右。 我需要左div延伸到可用空间,但是如果窗口太小,则右div需要降到下面。这是我目前拥有的,但我不确定要改变什么 <style> .bbleft { min-height: 237px; overflow:hidden; } .bbright { float: right; width: 300px; min-height: 237px; margin-left: 10px

我有两个div,我需要两个div的最小大小都在300px左右。 我需要左div延伸到可用空间,但是如果窗口太小,则右div需要降到下面。这是我目前拥有的,但我不确定要改变什么

<style>
.bbleft {
    min-height: 237px;
    overflow:hidden;
}

.bbright {
    float: right;
    width: 300px;
    min-height: 237px;
    margin-left: 10px;
}
</style>

布尔夫特先生{
最小高度:237px;
溢出:隐藏;
}
B.对{
浮动:对;
宽度:300px;
最小高度:237px;
左边距:10px;
}
简单地使用这个

.bbleft {
    min-height: 237px;
    overflow:hidden;
float:left;width:100%;
}
这就是你需要的

HTML

css3方法

灵活的左div。 当页面太小时,右div下降。 左div填充空间的其余部分

HTML


嗨,我想这就是我需要的,但是右边是静态大小,左边需要扩展。我们的答案对你有帮助吗。。?
<div class="container">
    <div class="left">
        content fixed width
    </div>
    <div class="right">
        content flexible width
    </div>
</div>
.container {
   height: auto;
   overflow: hidden;
}

.left {
    width: 300px;
    float: left;
    background: #aafed6;
}

.right {
    float: none; /* not needed, just for clarification */
    background: #e8f6fe;
    /* the next props are meant to keep this block independent from the other floated one */
    min-width:300px;
    width: auto;
    max-width:500px; /* not neccessary */
    overflow: hidden;
}
<div class="left"></div>
<div class="right"></div>
body{
    width:100%;
}
body div{
    min-width:300px;
    float:left;
}

.left{
    width: calc( 100% - 310px );
}