@AkoToSiJeromeEh
Posted
Hi ! Great Work Out there , for me i more prefer to use d-flex in order to center a div because there is no calculation(top , left) in order to center a div rather than using position absolute or relative but its up to you on what you want but for me again its d-flex because it offers more flexibility and control over the layout. hope this suggestion helps . happy coding!
body {
font-family: 'Outfit', sans-serif;
background-color: var(--light-gray);
add this if you prefer to use d-flex to center the component
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
} .qr-box {
background-color: var(--white);
width: 320px;
text-align: center;
padding: 20px;
border-radius: 20px;
display: flex;
flex-direction: column;
gap: 20px;
you can remove this if you prefer to use d-flex
/* position: absolute; */
/* left: 50%; */
/* top: 50%; */
/* transform: translate(-50%, -50%); */
}