@orphandeity
Posted
flexbox is the easiest way to quickly center content. a quick google search will fill you in on the details, but what you want to do is put the following CSS rules on your parent container - probably the body element in this scenario, but whichever element is parent to the element you want centered.
.container {
height: 100vh; // this sets height to the screen height
display: flex;
align-items: center; // center content vertically
justify-content: center; // center content horizontally
}
Marked as helpful
@DivyanshiDetroja
Posted
@orphandeity Thankyou so much, this fixed the responsiveness like butter