The problem is that it is not clear how the vertical-align property works.
Here is an example:
div { display:inline-block; border:1px solid red; padding:5px; } div.main { padding:10px; } .first { width:100px; height:100px; } .second { width:100px; height:100px; } .third { width:110px; height:50px; } .four { width:110px; height:50px; } <div class="main"> Hello world! <div class="first">Hello world 1! Hello world 1! Hello world 1!</div> <div class="second">Hello world 2!</div> <div class="third">Hello world 3!</div> <div class="four"></div> </div> As you can see the blocks go in a row as required by display:inline-block; But you need to somehow set the alignment of these blocks: align with the top, bottom, middle. And here the vertical-align property should help us, because the display:inline-block; property display:inline-block; gives us the nature of inline objects. But it was not there that the problem was that if the block is an inline-block, then if there is some text inside, then the alignment will be equal to this text, and not to the block.
Explain to me how vertical-align works with inline-block .
How to ignore content (text) inside an inline-block element?