OK guys, I need some help…
I have a table cell which I need to fill with an image I get from an url. The image width/height ratio is different than the one of the table cell – the image is longer than the cell. I need to fit it in with 100% height, and trim the left and right ends so it fits by width.
I am new to the website so I can’t post pics of examples, but I hope I made myself clear as to what is the problem…
Any help would be highly appreciated…
The easiest solution would be to set it as a background image for the table cell, it will get cropped visually automatically.
If you want to resize that background image so that it completely covers the table cell, while maintaining its aspect ration, you can use the css3 property (limited browser support, IE…):
The complete code: