Answers for "how to center a position element css"

CSS
7

center a div css

.center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
Posted by: Guest on March-31-2021
6

centering css elements

// add to the parent element
.parent {
	display: grid;
    place-items: center;
}
Posted by: Guest on August-06-2020

Code answers related to "how to center a position element css"

Browse Popular Code Answers by Language