SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Ohio
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding .current to menu

    Hi,

    I was wondering if someone here could help me with adding .current to this menu? I'm using the one with the tabs down. I have been playing with it for a couple days, and I just can't get it. Surely it's possible, right?
    Susan
    Auxano Creative (formerly The WebDesign Loft)

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, add the "current" class to the appropriate tab like:
    Code:
    <li>
    <a class="xmenu2 current" href="#nogo"><b class="xsnazzy"><span class="xboxcontentd">
    Paul<br>Cezanne</span>
    </b><b class="xtop"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b></a>
    </li>
    and then add the class to the hover styles like:
    Code:
    a.xmenu2:hover span, a.current span {color:#000;}
    
    a.xmenu2:hover .xb1, a.current .xb1 {background:#888;}
    a.xmenu2:hover .xb2, a.xmenu2:hover .xb3, a.xmenu2:hover .xb4, a.current .xb2, a.current .xb3, a.current .xb4 {background:#fff; border-color:#888;}
    
    .xboxcontentd {display:block; background:#cc6; border:0 solid #fff; border-width:1px 1px 0 1px; padding-top:5px;}
    a.xmenu2:hover .xboxcontentd, a.current .xboxcontentd {background:#eee; border-color:#888; border-top:1px solid #eee;}

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Ohio
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh my gosh! I cannot thank you enough!! I am so thankful for your help and it works!!!
    Susan
    Auxano Creative (formerly The WebDesign Loft)

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Ohio
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One more question.

    I also want to use this menu in a Wordpress blog. The part I need to add is this:

    HTML Code:
    <ul>
    <?php
    wp_list_pages('sort_column=menu_order&title_li='); ?>
    </ul>
    How can I add that to this:

    HTML Code:
    <ul>
    <li>
    <a href="index.php" class="xmenu2"><b class="xsnazzy"><span class="xboxcontentd">
    Home</span>
    </b><b class="xtop"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b></a>
    </li>
    </ul>
    and make it dynamic?
    Susan
    Auxano Creative (formerly The WebDesign Loft)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •