bin Neuling und ich habe folgendes Problem: Ich möchte jedem Menüpunkt der Navigation (verwendet wird CSSMenü Horizontal) eine andere Farbe zuweisen.
Code: Select all
/* The wrapper clears the floating elements of the menu */
#wrapper{}
ul#primary_nav a:hover{background: #003399;color: #FFC}
/* Styling the basic apperance of the menu elements */
/*ul#nav a{float:left;width: 95px;padding: 5px 0;background: #CCCC00;text-decoration:none;color: #003399}*/
ul#primary_nav a {
display: block;
margin: 0px;
padding: 4px 10px;
color: #003399;
background: #CCCC00;
text-decoration: none;
}
ul#primary-nav,ul#primary-nav li{list-style-type:none;margin:0;padding:0}
ul#primary-nav{margin:0 auto;font-size: 90%}
ul#primary-nav li{;margin-right: 3px;text-align: center}
* html body ul#primary-nav li{;margin-right: 2px;text-align: center}
ul#primary-nav a{width: 125px;padding: 5px 0;background: #CCCC00;text-decoration:none;color: #003399}
ul#primary-nav a:hover{background: #003399;color: #FFC}

Und gleich noch eine Frage: Der angeklickte Menüpunkt sollte solange markiert sein, wie die Seite besucht wird.
Habe es hiermit versucht:
Code: Select all
ul#primary-nav a:active{background: #003399;color: #FFC}
Muss ich hier noch was ändern?:
Code: Select all
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" 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="menuactive menuparent"><a class="menuactive menuparent" {elseif $node->current == true}
<li class="menuactive"><a class="menuactive" {elseif $node->haschildren == true}
<li class="menuparent"><a class="menuparent" {else}
<li><a {/if}
href="{$node->url}">{$node->menutext}</a>{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
</div>
{/if}
Schöne Grüße
Fahdabo