javascript - Same size for all cells in a table with different sized images? -


i have problem i've been stuck on 1-2 days now.

i have 3x3 table, , cells have images in them. images of different size.

this want:

1) @ times, cells should have same size (i.e. same height tr & same width td).

2) when window width reduced, cells & images should automatically shrink fit in available space. cells should still have same width & height.

3) images should not expand beyond native size.

4) should work on major browsers.

jsfiddle: http://jsfiddle.net/ahmadka/ac3dl/

codepen (jsfiddle down/slow sometimes): http://codepen.io/anon/pen/qaasc

i've tried several different things, can't find fits criteria .. hope can me out here ..

i can accept javascript functionality too, in case can't done purely through css/html ..

i think this article can you.

check out jsfiddle author has created.


Comments