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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -