I've been trying to vertically center a div, tried both position: absolute
and flexbox, neither worked.
Also tried to add styles to both the parent div and child divs, still did not work. It centers horizontally but does not center vertically
here's the HTML for the parent element
<div className="all-questions">{renderQuestions}</div>
here's the CSS for the parent element
.all-questions {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
Thank you!