CSS div Overflow hidden -


newbie question here. in css have div overflow hidden in displaying images. images tall (varying sizes) poses problem. wide images ok when scaled down.

with tall images div showing image "head downwards" normal. type of images top not important (yacht mast , sails). there way can display images in div top cut off instead of bottom?

any ideas? guys

jay

you can try this:

.image{   height: 150px;   overflow: hidden;   position: relative; } img{   position: absolute;   bottom: 20px; } 

see bin:

http://jsbin.com/muyoce/1/edit


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -