March 22, 2012
CSS DIV Overflow
Question by Devin
Site: http://partsconsign.com/parts/?custid=1
I don’t know what happened. All of a sudden, without changing the css, when I expand the “browse” categories, they overflow outside of the containing divs. Here is the css of the divs:
.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;
}
I don’t see why expanding these divs would cause any kind of overflow. None of these divs have any absolute positioning. What am I doing wrong? #partcat is within .pageArea, which is within .bodyArea. I’ve looked through many questions asked previous here, but all of them seem to have slightly different issues. Help!
Answer by Starx
You div
is fixed on 30px
height. Remove the height from this part
<div style="height: 30px; width: 100%">
Tested through the firebug, IT WORKS