Thats my fiddle: http://jsfiddle.net/atav8vzz/4/
Why is the html element with class \"vertical-align\" not vertically centered?
Just add justify-content: center; to your code:
.vertical-align {
display: ms-flex;
display: flex;
align-items: center;
justify-content: center;
}
I guess it depends what you're trying to achieve here. align-items
does so vertically. Where as justify-content
does so horizontally.
See this example. I have given the <h3>
height, to illustrate that it is centred vertically.