метод 1

.container {
  box-sizing: border-box;
  display: inline-block;
  width: 100%;
  zoom: 1;
}

метод 2

.container:before,
.container:after {
  content: " ";
  display: table;
}
.container:after {
  clear: both;
}
.container {
  zoom: 1;
}

метод 3

.container {
  overflow: hidden;
  display: block;
  zoom: 1;
}