Here is a clever solution that combines all classes A, B, and C in one container:
HTML code :
<div class="main">
<div class="container-1">
<div class="a">A - I contain some content</div>
<div class="b">B - I contain some content</div>
<div class="c">C - I contain some content</div>
</div>
</div>
CSS code :
.a {
background-color: red;
height: 20px;
}
.b {
background-color: green;
height: 30px;
}
.c {
background-color: blue;
height: 20px;
}
.container-1 div{
width: 45%;
display: inline-block;
}
@media (max-width: 639px) {
.container-1 div {
width: 100%;
display: block;
}
}