Is there any chance to maintain aspect ratio of DIV with max-height option?
There is a solution to keep aspect ratio:
div.stretchy-wrapper {
position: relative;
width: 100%;
padding-bottom: 75%;
background:gold; /** <-- For the demo **/
}
div.stretchy-wrapper > div {
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
}
It works perfect but what if want to keep DIV re-sizable but up to certain height? Let's say I want DIV stop re-sizing once it's height reaches 200px. Any ideas? Thank you in avance.