since this container will be holding two floating elements, the main-content (float: left) and the sidebar (float: right) - you'll need to add the "clearfix css attributes" to this .container parent (or, perhaps give this div an id="main" or id="page" or something)... And then in your css, add these attributes to the container:
#page {
display: table;
clear: both;
content: "";
}