如何将图像与文字对齐?

问题描述:

我要对齐与产品名称品牌形象,但我不知道如何在PHP ..如何将图像与文字对齐?

这是我的代码:

<div class="product-name"> 
    <?php echo $this->getChildHtml('product_attributes_placeholder'); //Placeholder for brands ?> 
    <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name')?></h1> 
</div> 

图片http://postimage.org/image/n0md49tqp/

裹形象与产品名称相同的div并设置display:inline; 还设置清除:如果你有一个漂浮在那里。

.product-name{ 
    display:inline; 
    clear: both; 
} 

如果这不起作用,你可能想尝试设置这两个元素float:left;

+0

不工作:( –