i found a template to work with from this post
http://forum.cmsmadesimple.org/viewtopic.php?t=32195
I am still having problems with it though. I get the pipe to show using an image but i cant get it to un-stick from the menu item.
I am using the following menu code:
Code: Select all
{* CSS classes used in this template:
#menuwrapper2 - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav2 - The id for the <ul>
.menuparent2 - The class for each <li> that has children.
.menuactive2 - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
{assign var='last_top' value=''}
{foreach from=$nodelist item=node}
{if $node->type == 'sectionheader'}
{assign var='last_top' value=$node->id}
{/if}
{/foreach}
<div id="menuwrapper2">
<ul id="primary-nav2">
{foreach from=$nodelist item=node name='menu'}
{assign var='last' value=''}
{if $last_top == $node->id}
{assign var='last' value='last '}
{/if}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string='</li></ul>' times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class=" menuactive2 menuparent2">
<a class="menuactive2 menuparent2" {elseif $node->current == true}
<li class="menuactive2">
<a class="menuactive2" {elseif $node->haschildren == true}
<li class="menuparent2">
<a class="{$last} menuparent2" {elseif $node->type == 'sectionheader' and $node->haschildren == true}
<li class="{$last} sectionheader"><span class="sectionheader">{$node->menutext}</span>{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="menu_separator" />{else}
<li>
<a class="{$last}"{/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
{if $node->target}target="{$node->target}" {/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
><span class="{$last} sectionheader">{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}
And the following CSS for it:
Code: Select all
#menu_vert {
margin: 0;
padding: 0;
}
.clearb {
clear: both;
}
#menuwrapper2 {
height: 1%;
width: auto;
margin: 0;
padding: 0;
}
ul#primary-nav2, ul#primary-nav2 ul {
list-style-type: none;
margin: 0px;
padding: 0px;
float:right;
}
ul#primary-nav2 li a {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: normal;
color: #ffffff;
display: block;
padding: 6px;
text-decoration: none;
background-image: url([[root_url]]/images/top_divider.gif);
background-repeat: no-repeat;
background-position: right center;
}
li#last a{
background-image:none;
}
ul#primary-nav2 li {
float: left;
}
ul#primary-nav2 li a:hover {
background-color: transparent;
}
ul#primary-nav2 li li a:hover {
color: #08476a;
font-weight: normal;
}
ul#primary-nav2 li a.menuactive2 {
color: #08476a;
font-weight: normal;
}
ul#primary-nav2 li a.menuactive2:hover {
color: #000000;
font-weight: normal;
}
#primary-nav2 li li a.menuparent2 span {
display: block;
}
* html #primary-nav2 li li a.menuparent2 span {
}
#primary-nav2 li:hover,
#primary-nav2 li.menuh,
#primary-nav2 li.menuparent2h,
#primary-nav2 li.menuactive2h {
color: #000000
}
#primary-nav2 ul,
#primary-nav2 li:hover ul,
#primary-nav2 li:hover ul ul,
#primary-nav2 li:hover ul ul ul,
#primary-nav2 li.menuparent2h ul,
#primary-nav2 li.menuparent2h ul ul,
#primary-nav2 li.menuparent2h ul ul ul{
display: none;
}
#primary-nav2 li:hover ul,
#primary-nav2 ul li:hover ul,
#primary-nav2 ul ul li:hover ul,
#primary-nav2 ul ul ul li:hover ul,
#primary-nav2 li.menuparent2h ul,
#primary-nav2 ul li.menuparent2h ul,
#primary-nav2 ul ul li.menuparent2h ul,
#primary-nav2 ul ul ul li.menuparent2h ul{
display: block;
}
#primary-nav2 li li {
float: left;
clear: both;
}
#primary-nav2 li li a {
height: 1%;
}
Here is a screenshot of my menu, you can see my seperator image in red border which i deliberately cropped it with extra space so it would not stick.
Also the menu cant stay centered, is pushed to the bottom. How do i fix that?
And finally remove the last line does not work it seems. am i doing something wrong?
Can you please point me exactly the correct code and where i need to put it? I am not very professional in CSS and i am really trying hard to do what would seem as an easy task.
Please it would be great help, and very much appreciated.
Thank you in advance.