html - image takes up whole table cell width and height in CSS -


how can make image takes whole table cell width , height if image size smaller table cell? image inside div tag.

try following css - example here -> http://jsfiddle.net/pq67x/1/

<style>     div {         width:50px;         height:100px;     }      div img {         height:100%;         width: 100%;         max-width:100%;         max-height:100%;     } </style> <div>     <img src='path/to/img.gif' /> </div> 

Comments

Popular posts from this blog

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -