I just started learning HTML and CSS and have come across this problem where justify-content wont vertically center my elements. My flex-direction is column and even with it as default row and using align-items my elements just wont budge vertically, but horizontally it always works. I'm really just trying to center the text both vertically and horizontally using flex. Also I'm using Firefox and I've tested on Chrome too. Here's the HTML
<div class="brands">
<section class="YSL">
<h1>Yves Saint Laurent</h1>
</section>
<section class="LV">
<h1>Louis Vuitton</h1>
</section>
</div>
And here is my CSS for the elements:
.brands{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.YSL{
color: black;
margin: 0;
}
.LV{
color: black;
margin: 0;
}