I need to vertically center some images inside their container <li> blocks using CSS but Im not sure how to go about it. I could resort to using javascript to calculate the height of the image and then do some math to center it vertically using margins but that seems clunky and stupid.
Is there any good CSS-based solution to accomplish vertical alignment without using fixed-margins (image height is variable)?
Images sticking to the top of their container li element:


You can using this css properties:
Like this demo: jsfiddle.net/ongisnade/P94YE/