Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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