I am experimenting with a mysql driven php page which needs to display a photograph which could be of various dimensions.
I want to place it in a container of fixed height and width.
If the photo is larger than the container I would like it to adjust without distorting its proportions, so that either its height or width completely fills the container according to which of those two is relatively the greater. IE if the photo is a landscape shape and the container a portrait, then the whole width must fit within the container and I would tolerate the consequent gap, witin the container, above and below the image.
Is that something which CSS can do on its own or would I have to create PHP code to read the image dimesions and then define the CSS styling?
At present , the image overflows the container and partially obscures the conent of its neighbour in http://www.gophones.co.uk/stockCardsMoreInfo,ALCATEL4,8240.html