javascript - Center an image inside a div. Horizontally and vertically -


i think question has been asked many times i've been searching web whole day , cannot find single solution. want centre image inside div looks frame. have images of different sizes, portrait, landscape. want them centered horizontally , vertically , not overflow container if size larger. i've read div vs table designs seriously, right want job done, solution appreciated.

check demo - http://jsfiddle.net/x6jdu/

table-cell has ie8+ support


Comments

Popular posts from this blog

All overlapping substrings matching a java regex -

c++ - Using OpenSSL in a multi-threaded application -

php - Deleting/Renaming a locked file -