title: CSS fit image to the container depending on the height or width
body: <p>I have a container that has size, say 600 for width and 400 for height.  Also I have 2 images one has size 600(width) * 1 and one has dimension 1 * 400(height).  Is there a way that I fit the first image to the container using <strong>width</strong> or max-width and the second one using <strong>height</strong> or max-height?  Thanks.</p>