gpt4 book ai didi

html - 将 div 拉伸(stretch)到页面底部

转载 作者:行者123 更新时间:2023-11-28 08:27:20 26 4
gpt4 key购买 nike

我目前正在制作我的网站,

http://csgoshack.com/shop/index.php?page=cats&id=12&action=all

当页面上有整页内容时,白色的 div 似乎只会转到页面底部。当页面上没有足够的内容时,它不会一直向下显示到此处显示的底部:

http://csgoshack.com/shop/index.php?page=status

我将如何着手制作它,以便无论页面上有什么,白色的 div 总是在我的 CSS 页面底部:

.whitebg 
{
padding: 10px;
border-right: 1px solid black;
border-left: 1px solid black;
background-color:#ffffff;
position: absolute;
left: 50%;
margin-left: -625;
margin-top: 50px;
padding: 10px;
height: 100%;
width: 1250px;
}

执行此操作的最佳方法是什么?

非常感谢。

最佳答案

将html和body的高度设置为100%,然后将白色div设置为min-height 100%

关于html - 将 div 拉伸(stretch)到页面底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28476874/

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