X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   long category name in menu (https://forum.x-cart.com/showthread.php?t=35302)

virtualgeorge 11-09-2007 07:03 AM

long category name in menu
 
I have a shop here: virtualgeorge.com/shop/home.php


The menus look like this, when a category name is long and wraps to the next line, it starts the continuing line under the bullet image.
  • Bed Linen
  • Bath Linen
  • Blankets
  • Down Comforters
and Pillows
  • Robes, Pajamas
and Slippers

But I want it indented so all the text liines up, I want it to look like this
  • Bed Linen
  • Bath Linen
  • Blankets
  • Down Comforters
    and Pillows
  • Robes, Pajamas
    and Slippers
Any tips appreciated.
thanks!

balinor 11-09-2007 08:02 AM

Re: long category name in menu
 
Are you using actual <li> tags or an image? An <li> will automatically wrap the way you want it to.

virtualgeorge 11-09-2007 10:08 AM

Re: long category name in menu
 
I don't know? Where would I look? Categories.tpl or menu.tpl ?

balinor 11-09-2007 10:12 AM

Re: long category name in menu
 
customer/categories.tpl is the default category menu.

virtualgeorge 11-09-2007 10:49 AM

Re: long category name in menu
 
Can I post what I have for the template? Its only 18 lines. Or would that help?

thanks!

balinor 11-09-2007 10:51 AM

Re: long category name in menu
 
Yep, that would help :)

virtualgeorge 11-09-2007 11:17 AM

Re: long category name in menu
 
Code:

{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="modules/Fancy_Categories/categories.tpl"}
{assign var="fc_cellpadding" value="0"}
{else}
{if $config.General.root_categories eq "Y"}
{foreach from=$categories item=c}
<font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems iconlink">{$c.category}</a></font><br />
{/foreach}
{else} {foreach from=$subcategories item=c key=catid}
<font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems iconlink">{$c.category}</a></font><br />
{/foreach}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" imgtop="categories.gif" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}


balinor 11-09-2007 03:49 PM

Re: long category name in menu
 
What is this?

class="VertMenuItems iconlink"

Do you have some sort of background image set in skin1.css?

virtualgeorge 11-09-2007 04:43 PM

Re: long category name in menu
 
That is for the bullet image

.iconlink {
background:transparent url(images/bullet.gif) no-repeat scroll left center;
padding-left:10px;
}

balinor 11-09-2007 06:07 PM

Re: long category name in menu
 
Yea, you are going to want to get rid of that or else it won't wrap correctly. You need to add an order list (<li> tags) to your menu.

virtualgeorge 11-10-2007 08:37 AM

Re: long category name in menu
 
So if I add the <li> tags to the menu, then in the css file I could add:

ul {
list-style-image: url(bullet.gif);
}

to create the bullet image for each line on the menu, right?


I added the list tags but the text is still not aligned?


thanks!!

balinor 11-10-2007 10:34 AM

Re: long category name in menu
 
It would go inside the foreach, like this:

<li><font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems iconlink">{$c.category}</a></font></li>

virtualgeorge 11-10-2007 11:25 AM

Re: long category name in menu
 
that worked for firefox, but internet explorer still does not align?
http://www.virtualgeorge.com/shop/home.php

balinor 11-10-2007 11:48 AM

Re: long category name in menu
 
Get rid of the style sheet specifying the bullet.gif and see if the default bullet behaves the same way.

virtualgeorge 11-10-2007 12:02 PM

Re: long category name in menu
 
Yes, tried it with & without bullet image, same result.
Currently I have nothing in the css specifying a bullet image.

balinor 11-10-2007 12:31 PM

Re: long category name in menu
 
Try this:
<ul>
{foreach from=$categories item=c}
<li><font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems iconlink">{$c.category}</a></font></li>
{/foreach}
</ul>

virtualgeorge 11-12-2007 09:08 AM

Re: long category name in menu
 
Thanks! That code worked for the alignment, I had left out the ul tags.


All times are GMT -8. The time now is 08:03 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.