Vertically Align Text With Flexbox

Vertically Align With Flexbox

Centering a text or detail vertically has usually been pretty a ache for lots front-end developers. Introduced inside the CSS3 specification, the display: flex property/fee offers an easy manner to vertically align any detail.


 <div class="align-vertically">
    <h1>I am vertically Middle!</h1>


<style type="text/css">
  .align-vertically {
    background: #13b5ea;
    color: #fff;
    display: flex;
    align-items: center;
    height: 200px;

Leave a Reply

Your email address will not be published. Required fields are marked *