Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

vertically and horizontally center a fixed div

// you dont need to know the divs dimensions and it does not require any container divs
position: fixed; 
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vertically #horizontally #center #fixed #div
ADD COMMENT
Topic
Name
1+8 =