Created
April 23, 2013 04:25
-
-
Save paingpyi/5440841 to your computer and use it in GitHub Desktop.
Maintaining images in a grid view with uniform width and height without forcing/stretching each images with fixed width and height.
The main ingredients are "picasa-image" should be "block" with fixed width/height and overflow 'hidden'. Then child images should have min-width & min-height so images are not stretched even though they may have lon…
This file contains hidden or 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
<li class="picasa-image"> | |
<a class="picasa-image-large" href="http://lh6.ggpht.com/-f_ywI3XJxmg/SxqjI5ZAWBI/AAAAAAAAD18/ByMLDXTzxVA/DSC_5180.JPG"> | |
<img class="picasa-image-thumb lazy" src="http://lh6.ggpht.com/-f_ywI3XJxmg/SxqjI5ZAWBI/AAAAAAAAD18/ByMLDXTzxVA/s144/DSC_5180.JPG"> | |
</a> | |
</li> | |
<style> | |
.picasa-image{ | |
border: 3px solid white; | |
overflow:hidden; | |
width: 130px; | |
height: 100px; | |
display: block; | |
} | |
.picasa-image-thumb{ | |
min-width: 130px; | |
min-height: 90px; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment