Page 1 of 1

Menu Child items; help needed to style

Posted: Thu Dec 06, 2007 1:15 pm
by sarah_h
Hi All,

I've a vertical menu ldeveloped from the code below. Now, it's all great but I can't see a way to style the child item as they don't have a selector associated with them! I can see that the current page can be targeted with a style but I don't see that a child item cold be! Can anyone help me with this?

Thanks

Sarah

{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}

{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="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} >

{elseif $node->parent == true && $node->depth == 1}
url}" class="activeparent"{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}

Re: Menu Child items; help needed to style

Posted: Thu Dec 06, 2007 1:31 pm
by kermit
if...


{menu}


then..

/* first level */
#navigation ul {} /* list */
#navigation ul li {} /* list item */
#navigation ul li a {} /* link */

/* second level */
#navigation ul ul {}
#navigation ul ul li {}
#navigation ul ul li a {}

/* third level */
#navigation ul ul ul {}
#navigation ul ul ul li {}
#navigation ul ul ul li a {}

etc...

refer to the stylesheets of the default navigation schemes (or some themes from the themes site) for some examples.

Re: Menu Child items; help needed to style

Posted: Thu Dec 06, 2007 1:44 pm
by sarah_h
Ah yes, I see that I can target these child items by creating styles for ul ul li.

Great, thanks Kermit for you help!

Sarah