![]() |
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 |
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:
<center><table border="0" cellspacing="5"> |
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. |
All times are GMT -8. The time now is 02:01 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.