gpt4 book ai didi

css - div 框不随高度增长

转载 作者:行者123 更新时间:2023-11-28 12:51:34 24 4
gpt4 key购买 nike

当存在更多内容时,蓝色框和白色 div 不展开会出现什么问题。

我已经放置了我正在处理的区域的 CSS,但这不可能是问题所在。

我希望框的高度与扩展到框外的交易类别相同。

CSS:

.content_inner{
height: auto;
background-color: #6c93b8;
margin:12px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
clear:both;
}

.homeWrapper{
padding: 12px;
width:auto;
background-image: linear-gradient(bottom, rgb(71,95,124) 73%, rgb(33,50,86) 85%);
background-image: -o-linear-gradient(bottom, rgb(71,95,124) 73%, rgb(33,50,86) 85%);
background-image: -moz-linear-gradient(bottom, rgb(71,95,124) 73%, rgb(33,50,86) 85%);
background-image: -webkit-linear-gradient(bottom, rgb(71,95,124) 73%, rgb(33,50,86) 85%);
background-image: -ms-linear-gradient(bottom, rgb(71,95,124) 73%, rgb(33,50,86) 85%);

background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.73, rgb(71,95,124)),
color-stop(0.85, rgb(33,50,86))
);

.leftColBlog{
display: inline-block;
width:650px;
margin:0 0 5px 0;
background-color: #fff;
}
.rightColBlog{
display: inline-block;
float: right;
width:230px;
text-align: left;
}

问题:

enter image description here

Live URL

最佳答案

一种方法是将 overflow: hidden; 添加到 .homeWrapper.content_inner

这为右侧菜单创建了一个新的 block 格式上下文,因为 float 元素从正常流中取出并需要清除或具有溢出值的容器不可见以与其他元素一起流动。

http://img13.imageshack.us/img13/7868/sitetow.jpg

关于css - div 框不随高度增长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16908492/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com