Answers for "how to center an item without flex"

CSS
1

how to center an item without flex

.container{
position: relative;
}
.child{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 50%);
}
Posted by: Guest on September-06-2021

Code answers related to "how to center an item without flex"

Browse Popular Code Answers by Language