In my page I show posts from feeds. A post-preview has an image and the content. The width of the image is fixed at 150px but I want the image to have height equal to content’s height. A post-preview content may have less than 450 chars, that means that the height of it will be smaller that other posts.
Is this possible using jQuery?
This is my code:
<div id="post">
<div id="image">
<?php
$imgpath="timthumb.php?src=THE-IMAGE.PNG&h=91&w=150"; } ?>
<img border="0" src="<?php echo $imgpath; ?>"></img>
</div>
<div id="thepost2">
<?php echo mb_substr(strip_tags($entry->description), 0, 450, "UTF-8"); ?>
</div>
</div>
If you will not specify the width it will set the width equal to height as well. So you will be specifying width appropriately as your needs. It may change the aspect ratio of the image and it might not look good.