Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to center product thumbnails

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-28-2010, 09:20 PM
 
MikeBrum MikeBrum is offline
 

Advanced Member
  
Join Date: May 2003
Location: Morro Bay, Ca
Posts: 59
 

Default How to center product thumbnails

Ok, maybe because it's late and I'm ridiculously tired, but I've tried so many things and cannot get this to work.

How do I get the product thumbnails to be centered in the table cells? Here is what that portion my /customer/main/products_t.tpl looks like:

(page link: http://67.20.92.91/store/Hand-shaped-Bodyboards/ )

-----------begin code------------

<tr{interline name=products_matrix}>

{foreach from=$row item=product name=products}
{if $product}

<td{interline name=products additional_class="product-cell"} style="padding-top:5px; padding-bottom:5px;">
<div class="image">
<div class="image-border"{if $config.Appearance.image_width gt 0 || $product.tmbn_x gt 0} style="width: {math equation="x+14" x=$product.tmbn_x|default:$config.Appearance.image _width}px;"{/if}>
<a href="{$product.alt_url|default:$product.page_url| amp}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>

{if $active_modules.Special_Offers && $product.have_offers}
{include file="modules/Special_Offers/customer/product_offer_thumb.tpl"}
{/if}
</div>
</div>
</td>

{/if}
{/foreach}

</tr>

-----------end code------------
__________________
Toobs.com

X-Cart version 4.3.1
PHP: 5.2.14
MySQL: 5.1.47
Reply With Quote
  #2  
Old 03-01-2010, 02:00 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: How to center product thumbnails

Yes, I can see you've had a good go at this - you've got align center in every single possible div/table cell.
In which case, most likely is that somewhere an align left is overwriting it.
Try changing this one:

dialog .content {
color:#CCCC99;
text-align:left;


}
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 03-01-2010, 07:15 AM
 
MikeBrum MikeBrum is offline
 

Advanced Member
  
Join Date: May 2003
Location: Morro Bay, Ca
Posts: 59
 

Default Re: How to center product thumbnails

Thanks for the response. I tried changing that in in main.css and altskin.css but it had no effect.

In ALTSKIN.css, I tried adding...

product-cell .image {text-align:center;


}


but that didn't work either. I also tried editing these lines within MAIN.css

}
tr.highlight td,
tr.highlight th
{
background: #3b2e22 none;
text-align:center;
}

tr.center-row th {
text-align: center;
}


but that didn't work either.

Here is what Web-Developer is showing me.

http://www.synapdev.com/downloads/help.jpg
__________________
Toobs.com

X-Cart version 4.3.1
PHP: 5.2.14
MySQL: 5.1.47
Reply With Quote
  #4  
Old 03-01-2010, 07:03 PM
 
MikeBrum MikeBrum is offline
 

Advanced Member
  
Join Date: May 2003
Location: Morro Bay, Ca
Posts: 59
 

Default Re: How to center product thumbnails

I tried some more things this evening, but they also did not work.

Any ideas? I'm missing something simple and it's driving me insane.
__________________
Toobs.com

X-Cart version 4.3.1
PHP: 5.2.14
MySQL: 5.1.47
Reply With Quote
  #5  
Old 03-01-2010, 07:59 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: How to center product thumbnails

In firebug - I added
margin: 0px auto;
to
.products .image .image-border in altskin.css
and they centered
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote

The following user thanks gb2world for this useful post:
MikeBrum (03-01-2010)
  #6  
Old 03-01-2010, 08:13 PM
 
MikeBrum MikeBrum is offline
 

Advanced Member
  
Join Date: May 2003
Location: Morro Bay, Ca
Posts: 59
 

Default Re: How to center product thumbnails

Thanks gb2world! That worked.

Much appreciated.
__________________
Toobs.com

X-Cart version 4.3.1
PHP: 5.2.14
MySQL: 5.1.47
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:20 AM.

   

 
X-Cart forums © 2001-2020