0

Why isn't this enough to vertically center a span inside a div?

div {  
  border: 1px solid blue;
  padding: 0;
}
.bigFont {
  font-size: 200px;
}
.toBeVerticallyCentered {
  display: inline-block;
  vertical-align: center;
}
<div>
  <span class="bigFont">A</span>
  <span class="toBeVerticallyCentered">B</span>
</div>

Thanks in advance.

CupOfGreenTea
  • 399
  • 1
  • 4
  • 12

0 Answers0