Jump to content

Solución para Centrar Subcategorías


soanix

Recommended Posts

He conseguido centrar las subcategorías aquí la solución:

hay que editar el codigo css de themes/tutheme/css/global.css

bucar las propiedades i editarlas:

global.css

#subcategories {
   clear:both;
   float:left;
   overflow:hidden;
   width:100%;
   text-align : center;

   }

ul.inline_list {
   float:left;
   left:50%;
   list-style-type:none;
   margin:0 auto;
   padding:0;
   position:relative;
}

ul.inline_list li {
   float:left;
   position:relative;
   right:50%;
}



En category.tpl, hay que crear un div envolviendo las subcategorías así



category.tpl

{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'}">
                   {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" />
                   {else}

                   {/if}



getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}

       {/foreach}




   {/if}



este es el resultado:

Resultado Subcategorías centradas

y ya sta.


  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Muchas gracias por tu solución, he intentado todas las de los otros posts y ninguna funcionaba... Solo tengo un problemilla con esta solución, y es que los nombres de categorías largos los corta por la mitad, tanto en explorer con en firefox. Adjunto una imagen para que veas, alguna idea de como solucionar ese problema? Muchas gracias! :)

47796_UnoSXqmlMRMcr2fCkTXX_t

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...