Skip to content

Instantly share code, notes, and snippets.

@charliecm
Created December 16, 2013 01:57
Show Gist options
  • Save charliecm/7981306 to your computer and use it in GitHub Desktop.
Save charliecm/7981306 to your computer and use it in GitHub Desktop.
Quick CSS tricks.
/* Smooth font */
.smooth-font {
transform: rotate(-0.0000000001deg);
}
/* Center an element vertically + horizontally */
.center {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
/* Center text vertically */
.parent {
display: table;
}
.child {
display: table-cell;
text-align: center;
vertical-align: middle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment