Created
September 6, 2015 12:20
-
-
Save seventhskye/a93f7c8fc97219273e74 to your computer and use it in GitHub Desktop.
Centres a div, vertically and horizontally in a webpage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.centre { | |
width:500px; | |
height:500px; | |
position:absolute; | |
left:50%; | |
top:50%; | |
margin:-250px 0 0 -250px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment