3 Ways to Center Content Horizontally and Vertically in CSS✨
Classic Option
.classic{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
CSS Grid Way
.grid{
display: grid;
place-items: center;
}
Flexbox Way
.flexbox{
display: flex;
align-items: center;
justify-content: center;
}
🛴 Follow me on:
https://bit.ly/3oBQbc0
Top comments (0)