Skip to content

Instantly share code, notes, and snippets.

@gpbmike
Created January 8, 2010 20:37
Show Gist options
  • Save gpbmike/272392 to your computer and use it in GitHub Desktop.
Save gpbmike/272392 to your computer and use it in GitHub Desktop.
<style type="text/css">
.wrap { position: relative; }
.centered { position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin-left: -10px; margin-top: -10px; }
</style>
<div class="wrap"><div class="centered">I'm centered</div></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment