Skip to content

Instantly share code, notes, and snippets.

@gustaff-weldon
Created August 29, 2014 10:22
Show Gist options
  • Select an option

  • Save gustaff-weldon/11439767d3498f023426 to your computer and use it in GitHub Desktop.

Select an option

Save gustaff-weldon/11439767d3498f023426 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