网站:http://partsconsign.com/parts/?custid=1
我不知道发生了什么。突然间,在不更改 css 的情况下,当我展开“浏览”类别时,它们会溢出到包含的 div 之外。这是 div 的 css:
.bodyArea
{
width: 900px;
background-image:url(/images/bg.jpg);
background-repeat:no-repeat;
border-width: thin;
border-style: solid;
margin-left:auto;
margin-right:auto;
-moz-border-radius: 8px;
border-radius: 8px;
min-height: 900px;
}
.pageArea
{
background-image: url(../images/page_bg.jpg);
background-repeat: repeat;
width: 95%;
position:relative;
margin-left: 25px;
margin-top: 30px;
min-height: 700px;
height:auto;
}
#partCat {
width: 775px;
padding:5px;
cursor:pointer;
}
我不明白为什么扩展这些 div 会导致任何类型的溢出。这些 div 都没有任何绝对定位。我究竟做错了什么? #partcat 位于 .pageArea 内,而 .pageArea 位于 .bodyArea 内。我已经浏览了之前提出的许多问题,但所有问题似乎都略有不同。救命!
最佳答案
您的 div
固定在 30px
高度。删除该部分的高度
<div style="height: 30px; width: 100%">
通过 firebug 进行测试,可以正常工作
关于CSS DIV 溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9828205/