Last active
December 6, 2023 06:40
-
-
Save mksddn/cc0de8ffb04c733cf1e185217e173b96 to your computer and use it in GitHub Desktop.
Centering css
This file contains hidden or 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
.center { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-right: -50%; | |
transform: translate(-50%, -50%) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment