Skip to content

Instantly share code, notes, and snippets.

@maradondt
Last active June 2, 2025 12:41
Show Gist options
  • Save maradondt/f485e3c387f5566b2dfff256fc2115e8 to your computer and use it in GitHub Desktop.
Save maradondt/f485e3c387f5566b2dfff256fc2115e8 to your computer and use it in GitHub Desktop.
.position-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* JS */
/* position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)', */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment