Q:

CSS applying Max-height and Auto height property at the same time for an image

How do I set the the max-height:270px and height:auto simultaneously such that if a content(image) is too large it should shorten its dimensions and put it under 270px, else it should be an auto height.
I tried with overflow-Y but I dont want a scrollbar, just a mini version of the pic. How can I do that?

A:

CHANGED CODE :: TRY IT
img{
height:100%;
max-height:270px;
}

