eaglei22
eaglei22

Reputation: 2830

Prevent div from overlapping using height / min-height attribute

#userIDTableCell
{
   border-style:solid;
   border-color:#000;
   border-width:0px;
   min-height: 130px;
}

When I use the min-height attribute, the top div overlaps the bottom divs.. but when I remove it, then the bottom divs will move proportionally with the top div; which is what I want to happen when I set a min-height value.

The research I've done and the things I've tried don't seem to work. I've tried setting the other div's to relative and that doesn't work. Not sure how else to override this. I've also tried setting the div as a float..

Upvotes: 0

Views: 1368

Answers (1)

Matthew R.
Matthew R.

Reputation: 4350

You should set your height to auto if you are using the min-height attribute.

#userIDTableCell
{
   height: auto;
   border-style:solid;
   border-color:#000;
   border-width:0px;
   min-height: 130px;
}

Upvotes: 2

Related Questions