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

Python __call__ special method practical example -

arrays - jQuery - Retrieve values from HTML elements and return their sum -