The goal is to vertically center text in a div. This answer suggested using display: flex
and align-items: center
, but it's not working.
Codepen: https://codepen.io/anon/pen/qgOJZg
<div id="messageBox" style="">
<div class="message">YO THERE THIS ROCKS!</div>
</div>
#messageBox {
min-width: 150px;
padding: 15px 35px;
position: absolute;
margin-left: 50%;
bottom: 0;
background: #424242;
color: #FFF;
cursor: pointer;
text-align: center;
border-radius: 5px 5px 0 0;
font-family: "Lato";
font-size: 17px;
display: flex;
align-items: center;
justify-content: center;
}