CSS Container not growing with grid?

Posted by CmdrTallen on Stack Overflow See other posts from Stack Overflow or by CmdrTallen
Published on 2009-10-17T02:07:53Z Indexed on 2010/03/14 0:05 UTC
Read the original article Hit count: 299

Filed under:
|

Hi, I have a container background defined in CSS like this;

.container {
    background:#fff;
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width:970px;
    border:1px solid #000;
    padding:5px 10px;
}

The problem is I have a jqGrid put in the bottom of the container (near the bottom edge) and when its initially drawn it does fit inside the container panel and looks correct. Something like this (please pardon my non-l33t graphic skillz):

alt text

But then when I populate the grid with rows it outgrows the container and it looks really tacky, something like this (I circled the original container background edges):

alt text

I am sure its something I am doing wrong with the CSS. Any advice would be appreciated.

EDIT: The problem isn't the width its the height of the container being overlapped by the new height of the now populated grid

© Stack Overflow or respective owner

Related posts about css

Related posts about jqgrid