Skip to content

Instantly share code, notes, and snippets.

@bidah
Created March 13, 2013 15:16
Show Gist options
  • Save bidah/5153113 to your computer and use it in GitHub Desktop.
Save bidah/5153113 to your computer and use it in GitHub Desktop.
centering with absolute position
/**
* centering with absolute position
*/
div {
width: 130px;
height: 130px;
background-color: blue;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
<div>
<div class="hella">warapwawarap warap</div>
</div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment