CSS DIV溢出

时间:2012-03-22 18:20:26

标签: css html overflow

网站: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中,位于.bodyArea中。我已经看过前面提到的许多问题,但是所有这些问题似乎都有些不同。救命啊!

1 个答案:

答案 0 :(得分:4)

div身高30px。从这部分中删除高度

<div style="height: 30px; width: 100%">

通过萤火虫进行测试, IT WORKS