I have a problem in adjusting all the products in proper way. Some products are two line name and some products are one line name so it is showing not a great impact on customer. Can we add one extra line before add to cart button so it will show in one line.

Any idea will be appreciated.enter image description here


The quick and easy solution for this problem is, adding a min-height CSS property to the product name enclosing div element.

In default Magento, product name is rendered like this.

File : app\design\frontend\base\default\template\catalog/product/view.phtml

 <div class="product-name">
      <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>

So add a css rule like this

.product-name {
    min-height: 50px; //put an appropriate value here.

I am not a frontend expert, but this is what comes to my mind first. Very easy solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.