ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

highlighting menu problems

January 13, 2009 11:08pm

Subscribe [1]
  • #1 / Jan 13, 2009 11:08pm

    celeritycat

    19 posts

    Moderator’s note: Moved to Howto.

    This question may be related to a resolved thread.

    I did exactly as mentioned in the thread above, but I am using an additional template to show a particular category. The highlighted li a is working but the highlighted current is not working. here is what i have.

    <div class="sidebar"><div id="menu"><ul>{exp:weblog:entries weblog="vpesite" category="18" orderby="title" sort="asc" limit="25" disable="member_data|trackbacks" dynamic="off"}<li><a href="http://{path=vpesite/ci/{url_title}}class=current">{title}</a></li>{/exp:weblog:entries}</ul></div></div>

    And the style sheet is…

    #menu ul{
        margin:0;
    }
    #menu li a {
        background:#FFFFFF;
        color:#557100;
        text-decoration: none;
        text-align: left;
        padding-top: 0px;
        padding-bottom: 0px;
        padding-right: 5px;
        padding-left: 5px;
        display: block;
        list-style-type: none;
    }
    
    #menu li.current a{
        background:#ECECEC;
        color:#004080;
        text-decoration: none;
        display: block;
        list-style-type: none;
    }
    #menu li a:hover {
        background:#ECECEC;
        color:#004080;
        text-decoration: none;
        display: block;
        list-style-type: none;
    }

    What am I doing wrong?

    also I keep editing this post because it keeps changing my code, actually what I have is
    {if segment_3 == url_title}class=“current”{/if} and so on

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases