html - Make image fit in slideshow container -


i making simple slideshow go on website making , images use/need larger div itself!

they dont overflow used overflow: hidden, dont shrink fit container!

i tried adding things max-width: 100% , things none of works :(

here code far: http://jsfiddle.net/v7cv9/

since image contained sub div, apply 240px height sub div , make img have 100% height

.slideshow > div {     position: absolute;     max-width: 100%;     width: 100%;     height: 240px;     max-height: 100%; }  .slideshow > div > img {     height: 100%;     width: 100%; } 

jsfiddle: http://jsfiddle.net/l5ngn/


Comments

Popular posts from this blog

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

Python ctypes access violation with const pointer arguments -