I'm guessing you're using overflow: auto to expand with the floating elements within it? If so, another option you have is to float your container left. That will make it expand, but will remove the centering. Luckily you can get the centering back. Make these changes to container:

Code:
float: left;
margin: 0 50%; /* moves left edge to center */
position: relative;
left: -454px; /* move left edge back half the width, to truly center */