Only getting around to trying out flexbox now and I'm using it to vertically center content inside a div.
.parent{
display: flex;
align-items: center;
justify-content: center;
}
<div class="parent">
<h1>Title</h1>
<p>Paragraph one.</p>
<p>Paragraph two.</p>
</div>
So when I do this it works but the child elements are placed beside each other like they're not block items anymore. How can I have it that they're vertically centered but stacked on top of each other?
Cheers!