hi
is it possible to make the images on the featured products the same size?
thanks
paul
hi
yes i see what you mean but if you look at http://www.feb14th.co.uk/ the images make the page untidy, so i was thinking is there a way to make them one size just for the featured page?
thanks
paul
Hi Paul,
Yes - I see what you mean, however the central vertical alignment of each featured product may be contributing to the untidy look. How about trying them top-aligned? In html/featured.php you will find the following code:
<td align='center'>
..try changing this to:
<td align='center' valign='top'>
That should tidy things up significantly...
Cheers,
David.
hi
cheers :) i think i will leave it like it is, as once ive added content etc i think it will look ok..
thanks again, top support as usual
paul
I managed to top align the images (4 in a row), but my feed images have different heights. As a result the 'price' and 'more information' words are not in line. They vary in height, because they are 'glued' to the image.
How can I make a (table) row to align this information vertically?
I now have this code: (it is a randomproducts.php, info about this can be found somewhere else on the support forum)
<div class='featured'>
<table cellspacing='20'>
<tr>
<th colspan='<?php print count($featured["products"]); ?>'><?php print translate("Featured Products"); ?></th>
</tr>
<tr>
<?php foreach($featured["products"] as $product): ?>
<td align='center' valign='top'>
<!-- <h4><a href='<?php print $product["productHREF"]; ?>'><?php print $product["name"]; ?></a></h4> -->
<?php if ($product["image_url"]): ?>
<p><a href='<?php print $product["productHREF"]; ?>'><img border='0' width='120' src='<?php print $product["image_url"]; ?>' alt='<?php print $product["name"]; ?>' /></a></p>
<?php endif; ?>
<!--
<?php if ($config_useInteraction): ?>
<small>
<?php if ($product["reviews"]): ?>
<?php print tapestry_stars($product["rating"],"s"); ?>
<a href='<?php print $product["reviewHREF"]; ?>'><?php print $product["reviews"]." ".translate("Reviews"); ?></a>
<?php else: ?>
<a href='<?php print $product["reviewHREF"]; ?>'><?php print translate("Review This Product"); ?></a>
<?php endif; ?>
</small>
<?php endif; ?>
-->
<p>
<?php if ($product["numMerchants"] > 1): ?>
<em><?php print translate("from2"); ?></em> <strong><?php print $config_currencyHTML.$product["minPrice"]; ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><?php print translate("Compare Prices"); ?></a></span>
<?php else: ?>
<strong><?php print $config_currencyHTML.$product["price"]; ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><?php print translate("More Information"); ?></a></span>
<?php endif; ?>
</p>
</td>
<?php
if ($count++ == 3)
{
print "</tr><tr>";
$count = 0;
}
?>
<?php endforeach; ?>
</tr>
</table>
</div>
Hi Al,
I'll have more time to look at this tomorrow; but as an alternative to fixed width,
what about scaling images to a fixed height instead? To try this, instead of:
<img border='0' width='120'
...try:
<img border='0' height='120'
(adjust '120' as required)
Cheers,
David.
OK, thank you Dave, that does the trick... It is now all aligned.
Hi Paul,
The script currently sets the width to 80 pixels, but does not set the height as this would cause the image to become distorted. You can see the code in html/featured.php as follows:
<img border='0' width='80'
As an alternative, you could choose to fix the height instead, but that would still leave you with variable widths. In my opinion, it's best to choose featured products that have consistent image sizes in order to give a neat and tidy look to your homepage...
Cheers,
David.