Paul Reading Posted April 16, 2009 Share Posted April 16, 2009 The category images are left justified(see attached image) is it possible to center these images so that the images look balanced? Link to comment Share on other sites More sharing options...
rocky Posted April 16, 2009 Share Posted April 16, 2009 Have a look at css/global.css in your theme's directory. Search for /* category.tpl */ and try adding text-align: center; to the li or the img.If that doesn't work, you can also try having a look at the category.tpl file in your theme's directory in the <!-- Subcategories --> section. Perhaps adding align="center" to the ul or li will do what you want. Link to comment Share on other sites More sharing options...
Paul Reading Posted April 16, 2009 Author Share Posted April 16, 2009 Panic over. Post deleted. Link to comment Share on other sites More sharing options...
Paul Reading Posted April 16, 2009 Author Share Posted April 16, 2009 Can you expand on what you me by "to the li or the img."I have found the relevant code but I can't seem to find the right place to add the code. I think this is the bit of code that needs editing:-{if isset($subcategories)} <!-- Subcategories --> {l s='Subcategories'} {foreach from=$subcategories item=subcategory} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} {/foreach} Link to comment Share on other sites More sharing options...
rocky Posted April 16, 2009 Share Posted April 16, 2009 Sorry about that, I just tested my advice and it didn't work. It doesn't want to centre. That's what I get for trying to rush. The only way I can get it to work is to adjust the margin so that it looks centred, for example, add: body#category #subcategories ul { margin-left: 20px; } to global.css in the /* category.tpl */ section. Link to comment Share on other sites More sharing options...
Paul Reading Posted April 17, 2009 Author Share Posted April 17, 2009 Thanks that has done the job. Link to comment Share on other sites More sharing options...
Paul Reading Posted April 17, 2009 Author Share Posted April 17, 2009 No this is not the answer. When there are five categories it is perfect, but when there are only four it is still off-centre. I don't know why I couldn't think of this before.Rocky you have been so helpful before, I thiank you. Do you think if I replace "margin-left: 20px" with align "center" it would fix the problem? Link to comment Share on other sites More sharing options...
rocky Posted April 19, 2009 Share Posted April 19, 2009 I'm not sure whether that would work. I wasn't able to get the ul to centre horizontally. I found this link that might help though. Link to comment Share on other sites More sharing options...
Recommended Posts