| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Centering Subcategories | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Centering Subcategories
Hi, I've been trying to center the Subcategories that are on this site which I am working on:
http://88.208.205.21/home.php?shopkey=martin and then go to: http://88.208.205.21/home.php?cat=253 for an example. I edited customer/main/subcategories_t.tpl as follows (the added parts are in red): Code:
All the code in black is the original code. The code I have added makes the page display the subcategories twice if there are two, or three times if there are three, etc. I know that it needs to display all the subcategories, and I presume it comes from this code: {foreach from=$subcategories item=subcategory} but can anybody help me to fix this? All I want was to centre the subcategories, so that they appear like the related products, for example: http://88.208.205.21/product.php?productid=17514&cat=262&page=1
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#2
|
|||||||
|
|||||||
Re: Centering Subcategories
Not sure I understand your problem but you have declared that the table has a width of 100%. This makes it impossible for it to be centered. You could try removing the width declaration and just add a center declaration:
Code:
__________________
www.qualitylamps.eu X-Cart Gold 4.1.8, PHP 5.2.6, MySQL 5.0.51a, Apache 2.2.9 www.vervangjelamp.nl X-Cart Gold 4.2.0, PHP 5.2.6, MySQL 5.0.37-standard, Apache/2 Sorry for the weird user name, I registered it by mistake |
|||||||
#3
|
|||||||
|
|||||||
Re: Centering Subcategories
I wanted to make the subcategory boxes appear centred within their cells, i.e. if there was only subcategory, it would only have one table cell, and would appear centred in that, if there were two subcategories, they would appear to be spaced equally horizontally, etc. I don't want to centre the entire table itself.
Using the code I added (which I took from the modified version of modules/Recommended_Products/recommends.tpl which I have uploaded to Completed Mods) I wanted to lay out the subcategory images in the same way as you see in the Related Products on the website.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|