Faced such a task: the red inline-block some reason does not want to center on the center of the vertical-align: middle; and goes beyond its boundaries - why and how can this be solved?
.wrapper { height: 100px; } .class-1 { display: inline-block; width: 60%; height: 100px; background-color: black; } .class-2 { display: inline-block; vertical-align: middle; width: 20%; height: 50px; background-color: red; } .class-3 { display: inline-block; vertical-align: top; width: 20%; height: 80px; background-color: blue; } <div class="wrapper"> <div class="class-1"></div><div class="class-2"></div><div class="class-3"></div> </div>