Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

centre div vertically and horizontally

.name-of-div-to-be-centered {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}
Source by markodenic.com #
 
PREVIOUS NEXT
Tagged: #centre #div #vertically #horizontally
ADD COMMENT
Topic
Name
1+9 =