I have such a 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 the .CSS only contains
img.gamethumb
{
height:6em;
}
So the picture resizes according to its aspect ratio, say it has dimensions (6em,Yem). I want the ".game_img_div" to also have the dimensions (6em,Yem).
How can I do it? Thanks !
try for css:
and the img tag it's without
</ img>
Change the display type of the container div:
http://jsfiddle.net/S8GK4/
This will do the trick.
http://jsfiddle.net/95ZUw/