-1

what dose "vertical-align:middle;" do? It doesn't center the text in vertical. How to center text in vertical in CSS

#sectionArea {
  vertical-align: middle;
  min-height: 300px;
  text-align: center;
  font-size: 50px;
  font-weight: bolder;
}
<section id="sectionArea">
  <p>Get your resumes quickly and easily.</p>
</section>
j08691
  • 197,815
  • 30
  • 248
  • 265
  • Hi and Welcome to SO. Please take the [tour] first and then read [ask]. Also use the search function the next time. Your question is commonly asked and answered a hundret times easily on this site. – tacoshy May 06 '22 at 19:35
  • `vertical-align: middle` aligns the text in the vertical center of the `line-height`. It does not center it within the entire element. – tacoshy May 06 '22 at 19:36
  • vertical-align can only verticaly align content inside a th or td element or an element receiving the display:table-cell value( to use the table-layout display) – G-Cyrillus May 06 '22 at 20:31

0 Answers0