Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to center an absolute div

//How to center an absolute div
.child {
    position: absolute;
    top: 50%;  
    left: 50%; 
    transform: translate(-50%, -50%);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #center #absolute #div
ADD COMMENT
Topic
Name
4+8 =