Align inline-block in block vertically

<div class="out">
  <div class="in">Inline</div>
</div>
.in {
  display: inline-block;
  vertical-align: middle;
  background: green;
  height: 20px;
  width: 100px

}

.out {
  background: #ADD8E6;
  height: 80px;
}

.out:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

image.png

#html
0
Ivan Borshchov profile picture
May 31, 2017
by Ivan Borshchov
Did it help you?
Yes !
No

Best related

Other by Ivan Borshchov