Skip to content

Instantly share code, notes, and snippets.

@gustaff-weldon
Created August 29, 2014 09:31
Show Gist options
  • Save gustaff-weldon/fb5f4225be301031efd9 to your computer and use it in GitHub Desktop.
Save gustaff-weldon/fb5f4225be301031efd9 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
*/
.container {
height: 300px;
width: 80px;
}
.child {
height:100%;
text-align: center;
border: 5px solid #aaa;
font-size:0;
}
img {
vertical-align: middle;
max-width: 100%;
}
.child:before {
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
}
<div class="container">
<div class="child">
<img src="http://lorempixum.com/100/100" >
</div>
</div>
// alert('Hello world!');
{"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