I use Direct Resize extension in a magento store as my product images have around 15 different sizes, square, portrait and landscape. The problem I'm facing now can be seen here:
Center resized image in magento,
8
I use Direct Resize extension in a magento store as my product images have around 15 different sizes, square, portrait and landscape.
The problem I'm facing now can be seen here:
The code showing the products is this:
If I add "text-align:center;" to
then the small default images will center but not the other ones.
Also, I want to show only the centered 176x176 px from the resized image.
Anyone knows how I can do this?
The problem I'm facing now can be seen here:
The code showing the products is this:
Code:
<ul class="products-grid spec-grid spec-grid3col grid-actions-absolute">
<?php endif ?>
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
<div class="title-over-image"><h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2></div>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->directResize(176,176,4); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
</a>
</li>
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
</ul> Code:
.products-grid .item {
float:left;
width:180px;
position:relative; /* For stickers (e.g. "new" and "sale") positionning */
} Also, I want to show only the centered 176x176 px from the resized image.
Anyone knows how I can do this?
- XtremXpert
- [1] reply
- XtremXpert
- XtremXpert
- [1] reply
- jordenstive
- [1] reply
Next Topics on Trending Feed
-
8