Skip to content

Instantly share code, notes, and snippets.

@smmurf
Created May 22, 2012 15:19
Show Gist options
  • Save smmurf/2769717 to your computer and use it in GitHub Desktop.
Save smmurf/2769717 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
div {
border: 1px solid red;
width: 300px;
height: 300px;
position: relative;
}
div img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
<div><img src="http://img.yandex.net/i/www/logo.png" alt=""></div>
{"view":"split-vertical","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