![]() |
Horizontal menu loop until end of screen
I need to create a loop to display the horizontal menu items until it reaches the end of the screen and then start on the next line. I have written the following code which displays one menu item on the first line and then the rest on the second.
<table cellpadding="0" cellspacing="0" > <tr > {foreach from=$categories item="category" name="h_categories"} {if $smarty.foreach.h_categories.first} <td class="hcNonActiveItembr{$category.categoryid}" height="25" nowrap="nowrap" valign="bottom"> <a href="home.php?cat={$category.categoryid}" class="hcLink" onmouseover="rollover('{$category.category}1','{$c ategory.category}1.gif')" onmouseout="rollover('{$category.category}','{$cat egory.category}.gif')"> <img src="{$ImagesDir}/custom/{$category.category}.gif" name="{$category.category}.gif" alt="{$category.category}"></a> </td> </tr> <tr> {else} <td class="hcNonActiveItembr{$category.categoryid}" height="25" nowrap="nowrap" valign="bottom"> <a href="home.php?cat={$category.categoryid}" class="hcLink" onmouseover="rollover('{$category.category}1','{$c ategory.category}1.gif')" onmouseout="rollover('{$category.category}','{$cat egory.category}.gif')"> <img src="{$ImagesDir}/custom/{$category.category}.gif" name="{$category.category}.gif" alt="{$category.category}"></a> {/if} {/foreach} Please help. |
Re: Horizontal menu loop until end of screen
Welcome to the X-Cart forums! Please start by reading the following thread, which will help you get started and hopefully make your experience here a positive one:
http://forum.x-cart.com/showthread.php?t=23970 Please note that this link is not an answer to your question, but we need you to update your signature with your X-Cart version so that we can answer your question correctly. Thanks! :) |
Re: Horizontal menu loop until end of screen
Thank you very much for this I am an absolute beginer
|
All times are GMT -8. The time now is 06:51 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.