Created
April 28, 2015 17:16
-
-
Save sagiavinash/51a5583346ac3d65fe42 to your computer and use it in GitHub Desktop.
image centering - fill configuration
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
/** crop vertical portions **/ | |
.outer-wrap{ | |
position:relative; | |
width:100px; | |
height:100px; /* @OH */ | |
background:#ccc; | |
overflow:hidden; | |
} | |
.inner-wrap{ | |
position:absolute; | |
top:-150px; /* -@IH/2 */ | |
height:300px; /* @IH */ | |
width:100px; | |
margin-top:50px; /* @OH/2 */ | |
} | |
img{ | |
position:absolute; | |
top:0; | |
right:0; | |
bottom:0; | |
left:0; | |
width:100%; | |
margin:auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment