Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

center div in middle of page

.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  /* bring your own prefixes */
  transform: translate(-50%, -50%);
}
Source by css-tricks.com #
 
PREVIOUS NEXT
Tagged: #center #div #middle #page
ADD COMMENT
Topic
Name
3+5 =