DIV div div div div div

Блоки должны стоять в один ряд

by Tolibjon Tolibov

HTML

<div class='container'>
  <div class='col-4-1'>
   <h5>БЛОК №1</h5>
   Блок с шириной 25%
  </div>

  <div class='col-4-2'>
     <h5>БЛОК №2</h5>
    Блок с шириной 50%
  </div>

  <div class='col-4-1'>
     <h5>БЛОК №3</h5>
    Блок с шириной 25%
  </div>

  <div class='col-4-2'>
     <h5>БЛОК №4</h5>
    Блок с шириной 50%
  </div>
</div>

CSS

.container {
  width: 600px;
  height: 200px;
  border: 1px solid red;
}
.col-4-1, .col-4-2{
  display:inline-block;
  height:100%;
  box-sizing:border-box;
}

.col-4-1{
  border:1px solid green;
  width:15%;
}

.col-4-2{
  border:1px solid green;
  width:35%;
}

h5{
  font-weight:bold;
  color:red;
  text-align:center;
}