#main_content {
width: 400px;
margin: 0 auto;
min-height: 300px;
height: auto;
background-color: #2185C5;
position: relative;
}
#container {
width: 50%;
height: auto;
margin: 0 auto;
background-color: #CCC;
padding: 10px;
position: relative;
}
Try this. It tested OK. There is a live check on jsfiddle.