So far, with the use of margin: auto
I have been able to center my flexbox horizontally but not vertically along my webpage.
I am quite new to CSS and would like some assistance. Thank you.
.container {
background-image: url(paperbackground.jpg);
color: #D64933;
margin: auto;
width: 500px;
}
.box {
align-content: center;
display:flex;
font-family: Arial, Helvetica, sans-serif;
font-size: 25px;
font-weight:bold;
justify-content: center;
padding: 2px;
}
<div class="container">
<ul>
<!--Below is an unordered list.-->
<div class="box"><li>Video Games</li></div>
<div class="box"><li>Watching technology, hacking and other documentaries.</li></div>
<div class="box"><li>Chess</li></div>
<div class="box"><li>Cricket</li></div>
</ul>
</div>