Created
May 18, 2012 21:47
-
-
Save anonymous/2727775 to your computer and use it in GitHub Desktop.
Untitled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
width: 500px; | |
height: 500px; | |
background: #b1b1b1; | |
margin: 0 auto; | |
} | |
.demo-1.container { | |
position: relative; | |
} | |
.demo-1 .center { | |
position: absolute; | |
top:0; | |
left:0; | |
right:0; | |
bottom:0; | |
margin: auto; | |
} | |
.ts-demo.container { | |
display: table; | |
} | |
.ts-demo .center { | |
display: table-cell; | |
vertical-align: middle; | |
text-align: center; | |
/* display: inline-block; -- IE7 fallback */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container ts-demo"> | |
<div class="center"> | |
<img src="http://lorempixel.com/200/300/sports/" /> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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