Jump to content

Centre Category images?


Recommended Posts

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

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 -->

Link to comment
Share on other sites

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

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

×
×
  • Create New...