How can Align Bootstrap 5 Card component to Center

https://i.stack.imgur.com/y86aU.jpg

Above Screen-shot I want to align the center.
My Parent division class name main-div

>Solution :

 .main-div  {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

}

Leave a Reply