@artuino0
Posted
Hi Jordan. You can center the div horizontally using Flex and setting the content with justify-content and align-items, for example:
//HTML
<div class="parent-div">
<div class="child-div"> Hello World! </div>
</div>
//CSS
.parent-div{
display: flex;
justify-content: center;
align-items: center;
}
@littledragonshrimp
Posted
@artuino0 Thanks Arturo, I tried this but whenever I 'display: flex;' all my code falls apart and they're not blocked over each other. I tried display: block; as seen in the code currently, and they're blocked over each other, just not centered horizontally