{SOLVED} CSSM, Horizontal Menu width issues.
Posted: Thu Nov 15, 2007 8:46 pm
Hey Everyone!
I have two problems, but they are not related. I will post my second problem separately.
This post is about my menu. I snagged one of the awsome menus from cssplay and it works perfectly in my static html site, ( http://resultsmedia.on.ca/transfer/hamelins/home.html ). For the life of me I can't get it to space properly in CMSMADESIMPLE. I have done everything I can think of, and I have been reading the Forums all morning and am not sure I am seeing the solution. All I want is for the CMS driven site menu to work like the static site... then again, I am certain I am missing something here.
Since I have the CMS site on an internal server I am not able to show you the working copy - sorry. I have attached a screen capture, and will see about getting it live.
Thank you!
Where I got the Menu
http://www.cssplay.co.uk/menus/pro_horizontal.html
Professional #1
CSS - static and cms are the same code
.menu1 {padding:0 0 0 32px; margin:0; list-style:none; height:35px; background:#fff url(images/button1.gif); position:relative; border:0px solid transparent; border-width:0 0px; border-bottom:0px solid #444;}
.menu1 li {float:left;}
.menu1 li a {display:block; float:left; height:35px; line-height:35px; color:#aaa; text-decoration:none; font-size:11px; font-family:arial, verdana, sans-serif; font-weight:bold; text-align:center; padding:0 0 0 8px; cursor:pointer;font-size:12pt;font-weight:bold;}
.menu1 li a b {float:left; display:block; padding:0 16px 0 8px;}
.menu1 li.current a {color:#fff; background:url(images/button3.gif);}
.menu1 li.current a b {background:url(images/button3.gif) no-repeat right top;}
.menu1 li a:hover {color:#fff; background:#000 url(images/button2.gif);}
.menu1 li a:hover b {background:url(images/button2.gif) no-repeat right top;}
.menu1 li.current a:hover {color:#fff; background:#000 url(images/button3.gif); cursor:default;}
.menu1 li.current a:hover b {background:url(images/button3.gif) no-repeat right top;}
My Menu: top_menu
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true}
url}" class="current"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->parent == true && $node->depth == 1}
url}" {if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
I have two problems, but they are not related. I will post my second problem separately.
This post is about my menu. I snagged one of the awsome menus from cssplay and it works perfectly in my static html site, ( http://resultsmedia.on.ca/transfer/hamelins/home.html ). For the life of me I can't get it to space properly in CMSMADESIMPLE. I have done everything I can think of, and I have been reading the Forums all morning and am not sure I am seeing the solution. All I want is for the CMS driven site menu to work like the static site... then again, I am certain I am missing something here.
Since I have the CMS site on an internal server I am not able to show you the working copy - sorry. I have attached a screen capture, and will see about getting it live.
Thank you!
Where I got the Menu
http://www.cssplay.co.uk/menus/pro_horizontal.html
Professional #1
CSS - static and cms are the same code
.menu1 {padding:0 0 0 32px; margin:0; list-style:none; height:35px; background:#fff url(images/button1.gif); position:relative; border:0px solid transparent; border-width:0 0px; border-bottom:0px solid #444;}
.menu1 li {float:left;}
.menu1 li a {display:block; float:left; height:35px; line-height:35px; color:#aaa; text-decoration:none; font-size:11px; font-family:arial, verdana, sans-serif; font-weight:bold; text-align:center; padding:0 0 0 8px; cursor:pointer;font-size:12pt;font-weight:bold;}
.menu1 li a b {float:left; display:block; padding:0 16px 0 8px;}
.menu1 li.current a {color:#fff; background:url(images/button3.gif);}
.menu1 li.current a b {background:url(images/button3.gif) no-repeat right top;}
.menu1 li a:hover {color:#fff; background:#000 url(images/button2.gif);}
.menu1 li a:hover b {background:url(images/button2.gif) no-repeat right top;}
.menu1 li.current a:hover {color:#fff; background:#000 url(images/button3.gif); cursor:default;}
.menu1 li.current a:hover b {background:url(images/button3.gif) no-repeat right top;}
My Menu: top_menu
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true}
url}" class="current"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->parent == true && $node->depth == 1}
url}" {if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}