Thursday, 15 April 2010

html - How to size to fit the image inside? -



html - How to size <div> to fit the image inside? -

i have such div:

<div class="game_img_div"> <a href="./play.php?game=free-kick-fusion"> <img class="gamethumb" src= " ./images/thumbs/free-kick-fusion.jpg"> </img> </a> </div><!--game_img_div-->

and .css contains

img.gamethumb { height:6em; }

so image resizes according aspect ratio, has dimensions (6em,yem). want ".game_img_div" have dimensions (6em,yem).

how can it? !

class="lang-css prettyprint-override">img.gamethumb { height:6em; } div.game_img_div { float:left; }

html css resize

No comments:

Post a Comment