how to make simple horizontal menu?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
pumuklee

how to make simple horizontal menu?

Post by pumuklee »

hi
how can i make horizontal menu

something like this

home | partners | contact | ...

thanks
suder

Re: how to make simple horizontal menu?

Post by suder »

YES, PLease help us!!

I was trying to create this holy horizontal menu but I'm starting to think that this is impossible.

CMS is so simple that creates only ultrs-super vertical menus... this menu manager template system kills me.

How on earth create a SIMPLE HORIZONTSAL MENU???.

PLEASE HELP

PEACE n LOVE
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: how to make simple horizontal menu?

Post by Dr.CSS »

If you look at a default install you will see a horiz. menu, the main CSS for it is...

/* menu list items */
div#menu_horiz li {
  float: left; /* makes the list horizontal */
  list-style: none; /* hides the list bullet */
  margin: 0 ;
  border-right: 1px solid #C0C0C0;
}

Set in the template here, note the div id...


 

This is telling the list in the identified div to float left... so whatever div you put it in you use theses CSS calls for them...
bbonora
Forum Members
Forum Members
Posts: 48
Joined: Mon Nov 06, 2006 6:10 am

Re: how to make simple horizontal menu?

Post by bbonora »

Create a template out of the code below.  It works very well.

{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->current == true}
url}" id="footer_active">{$node->menutext} |
{elseif $node->parent == true}
url}" id="footer_active">{$node->menutext} |
{else}
url}">{$node->menutext} |
{/if}
{if $node->index + 1 == $count}
url}">{$node->menutext}
{/if}
{/foreach}


{/if}

Here is the css I used
.footer {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: 160%;
color: #ffffff;
text-align: center;
padding: 3px 0;
}
.footer a:link, .footer a:visited {
color: #ffffff;
text-decoration: none;
font-weight: bold;
padding: 5px;
letter-spacing: 0.05em

}
.footer a:hover {
color:  #A06600;
}
#footer_active{
color: #A06600;
}

Here is the call call I used to the menu
{menu template='nav_bottom.tpl' number_of_levels='1'}
Graft-Creative

Re: how to make simple horizontal menu?

Post by Graft-Creative »

I've just used a variation on this script, and it seems to work ok.

However, i'm curious as the what the last {if statment is doing?

Code: Select all

{if $node->index + 1 == $count}
<a href="{$node->url}">{$node->menutext}</a>
{/if}
When I included this line, the last item in my menu was displayed twice?

Kind regards,

Gary
Locked

Return to “Modules/Add-Ons”