Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 menus and "current" state please help

    I have a problem with current state, i have 2 menus and i want 1 item from each menu to be highlighted depending on it's status(active or not)

    can someone show me how to do it right?am i suposed to use "classes" instead of "ids"?

    <body id="romana">
    <body id="taxa"> <!-- CSS meniu curent!! -->
    ................................................
    <link rel="stylesheet" href="meniu.css" type="text/css" />
    <div class="buttonscontainer" style="width: 324px; height: 30px">
    <div class="buttons">
    <ul id='menu'>
    <li ><a href='index.html' id="romananav" >Romana</a></li>
    <li ><a href='english/index.html' id="englishnav" >English</a></li>
    <li ><a href='francais/index.html' id="francaisnav" >Francais</a></li>
    <li ><a href='deutsch/index.html' id="deutschnav" >Deutsch</a></li>
    </ul>
    </td>
    </div>
    ................................................................
    <link rel="stylesheet" href="default.css" type="text/css" />
    <div class="buttonscontainer">
    <div class="buttons">
    <a><b><font size="2" color="#000000">AutoBorcea</font></b></a>
    <a href="taxa.html" id=taxanav>Home</a>
    </div>
    ------------------------default.css
    .buttonscontainer {width: 175px;}

    .buttons a {color: #FF9900;
    background-color: #FFFFFF;
    padding: 2px;
    padding-left: 3px;
    display: block;
    font: 11px Tahoma, sans-serif;
    font-weight: bold;
    text-decoration: none;
    text-align: left;}

    .buttons a:hover {background-color: #FF9900;
    color: #333;
    text-decoration: none;}


    body#romana a#romananav,
    body#english a#englishnav,
    body#francais a#francaisnav,
    body#deutsch a#deutschnav,
    body#taxa a#taxanav

    ul li a.current {
    color: #333;
    background: #FF9900;
    }
    Attached Thumbnails Attached Thumbnails 2 menus and &quot;current&quot; state please help-menu-css.jpg  
    Last edited by l0rdshad0w1; 12-30-2007 at 08:01 PM.

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    My site page Sources has three menus, You could have a look at it to see if it helps you.
    The CSS is in the HEAD section.

    Frank

    http://exitfegs.co.uk/Sources.html

    Code:
    a:link {
      color: #FFF;
      background-color: inherit;
      text-decoration: none;
    }
    
    a:visited {
      color: #FFFF00;
      background-color: inherit;
    }
    
    a:hover {
      color: #FF0000;
      background-color: inherit;
    }
    
    a:active {
      color: #FFFFFF;
      background-color: inherit;
    }
    View Source.
    Last edited by effpeetee; 12-30-2007 at 08:22 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

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