Jump to content

Products compare page - how to center image & title?


Recommended Posts

  • 1 month later...

This straightened up my comparison page:

Navigate to /themes/your theme/
Open products-comparison.tpl with editor
Navigate to line 43
Replace {$width}% with 33.333333333%
Still on line 43, add the following before the final '>' ... style="padding:6px;text-align:center;"

Link to comment
Share on other sites

  • 1 month later...

My solution to center the product image is to add a <center> tag on line 47, and the </center> tag on line 49 in themes/yourtheme/products-comparison.tpl:

 

<center><a href="{$product->getLink()}" title="{$product->name|escape:html:'UTF-8'}" class="product_image" >
			<img src="{$link->getImageLink($product->link_rewrite, $product->id_image, 'home')}" alt="{$product->name|escape:html:'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}" />
			</a></center>

 

and in comparator.css add a text-align:center to center the text (line 37):

 

#product_comparison
{
border-collapse: collapse;
text-align:center
}	

 

this should work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...