вот как получается
а вот как должно быть
код вставил как у меня он, сразу с пхп
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Лента</title> <style type="text/css"> .mainA{ margin:auto; background:#e8e8e8; max-width:480px; height:150px; border-radius:8px; margin-bottom:5px; border-bottom: 1px solid black; } .contentA, .menuA { padding: 10px; } .containerA{ width:200px; height:120px; float:left; margin:12px 16px 8px 16px; background: #f2f2f2; border-radius:8px; position:relative; } .contentA { width:100px; height:100px; margin-left:80px; text-align:left; } .menuA { width: 100px; height:100px; color: #f2f2f2; float: left; } .imgA{ border:1px solid #000; } .contentA li{ font-size:12px; font-family:verdana, sans-serif; display:inline; margin:0; } ul{ margin-top:20px; padding:4px; } </style> </head> <body> <div class="mainA products-grid"> <?php $_productCollection=$this->getLoadedProductCollection(); $_helper = $this->helper('catalog/output'); if ($_productCollection->count()): $_iterator = 0; foreach ($_productCollection as $_product): ?> <div class="containerA products-grid"> <?php $url = null; if ( $category = Mage::registry('current_category')) { $url = $category->getUrl(); $name = $category->getName(); } elseif ( $categories = $_product->getCategoryIds()) { $category = Mage::getModel('catalog/category')->load($categories[2]); $url = $category->getUrl(); $name = $category->getName(); } $link = is_null($url); ?> <div class="menuA"> <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img class="imgA" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="95" height="95" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a> </div> <div class="contentA"> <ul> <li> <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a> </li> <li>See all: <a href="<?php echo $url?>"><?php echo $name?></li> </ul> </div> </div> <?php endforeach;?> <?php endif;?> </div> </body> </html>