Exmaple: http://jsfiddle.net/vjqjv/7/
I have an image inside of a container (see #slider-section in the jsFiddle) which has a fluid height and a fixed max-height.
I have set max-height and max-width on my image to 100% (see #slider-img).
The Problem: When the browser window gets beyond a certain width, the image ignores the max-width and max-height setting and just gets larger then its container.
You can see it if you open the jsFiddle and expand the width of the browser.
The goal is to get the image to never exceed the width and height of its container and keep its aspect ratio.
This could be achieved by giving the container (#slider-section) a fixed height. However this is not a possible solution for me since it needs to be a fluid height.
Does anyone have a solution?
Is this what you need ? http://jsfiddle.net/vjqjv/10/
HTML:
CSS: