0

I have created two div's, both with display: inline-block. As long as both div's contain the same amount of text, the vertical alignment is fine. But if I add more text to the first div, the second one gets a strange top margin. The more text I add, the higher the top margin of the second div gets.

You can check the problem out in this JSFiddle (you'll probably have to watch the full-screen result to see what I'm talking about.

Could anybody please help me? I've looked on Stackoverflow, but I can't find an answer. Many thanks!

TheLeonKing
  • 3,501
  • 7
  • 32
  • 44

1 Answers1

1

Try adding vertical-align: top; to the <div class="box">

ckuijjer
  • 13,293
  • 3
  • 40
  • 45