gpt4 book ai didi

CSS 嵌套 div 高度 100%

转载 作者:技术小花猫 更新时间:2023-10-29 11:21:02 26 4
gpt4 key购买 nike

我目前在页面高度的 100% 处获得了#border div,但我正试图让#container div 在#border 内拉伸(stretch)到 100%。目前 #container 只会拉伸(stretch)以适应其中的内容。

* {
margin: 0;
}

html, body {
height:100%;
font-family: Georgia, Times, "Times New Roman", serif;
font-size:13px;
line-height:19px;
color:#333333;
background: #f5f1ec;
text-align: left;
}

#border {
background: #f5f1ec;
border:solid 1px #FFFFFF;
width: 880px;
margin: 40px auto 0;
padding:10px;
height: auto !important;
min-height: 100%;
height: 100%;
}

#container {
background: #FFFFFF;
padding: 10px 50px 0;
height: 100%;
}

最佳答案

已解决:

#container {
background: #FFFFFF;
padding: 10px 50px 0;
height: 100%;
width:780px;
position:absolute;
}

关于CSS 嵌套 div 高度 100%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2926696/

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