Skip to content

Instantly share code, notes, and snippets.

@sajadtorkamani
Created May 28, 2015 12:58
Show Gist options
  • Save sajadtorkamani/3749f16dc85945b20af1 to your computer and use it in GitHub Desktop.
Save sajadtorkamani/3749f16dc85945b20af1 to your computer and use it in GitHub Desktop.
// Vertically and horizontally align child element in parent element
img {
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment