Results 1 to 4 of 4

Thread: Help with Any Link Menu v2.2

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Help with Any Link Menu v2.2

    The Any Link Menu at http://www.dynamicdrive.com/dynamici...pmenuindex.htm automatically adds a "selectedanchor" CSS class to the currently selected anchor link. The script has background color in that class. I tried adding a text color to the "selectedanchor" class but it doesnt work. How to change the text color of the currently selected anchor link.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    The anchor link is:
    Code:
    .selectedanchor{ 
    color:#00ff00;
    }
    The links that expands and is selected on is:
    Code:
    .anylinkmenu a:hover {
    color:#00ff00;
    }

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    I had tried that already and it doesnt work. I attaching the code I have written as follows :

    HTML

    <ul id="main_nav">
    <li><a href="index-2.html" class="active">Home</a></li>
    <li><a href="#" class="menuanchorclass" rel="anylinkmenu1">Solutions</a></li>
    <li><a href="#" class="menuanchorclass" rel="anylinkmenu2">Products</a></li>
    <li><a href="industry.html">Industries </a></li>
    <li><a href="#" class="menuanchorclass" rel="anylinkmenu3">Company</a></li>
    <li><a href="index.html" >Contact us</a></li>
    </ul>


    main_nav css

    #header #main_nav {
    margin-top: 25px;
    width: 100%;
    overflow: hidden;
    }
    #header #main_nav li {
    float: left;
    margin-right: 30px;
    }
    #header #main_nav a {
    font-size: 13px;
    line-height: 18px;
    font-weight: bold;
    text-decoration: none;
    color: #2d3851;
    }
    #header #main_nav a:hover {
    color: #e40e62;
    }
    #header #main_nav a.active {
    color: #e40e62;
    }


    Any Link Menu CSS

    .selectedanchor { /*CSS class that gets added to the currently selected anchor link (assuming it's a text link)*/
    font-size: 13px;
    line-height: 18px;
    font-weight: bold;
    text-decoration: none;
    color:#ff0000;
    }


    /* ######### Default class for drop down menus ######### */

    .anylinkmenu{
    position: absolute;
    left: 0;
    top: 0;
    visibility: hidden;
    border: 1px solid #cccccc;
    border-bottom:0px;
    font: normal 11px Helvetica Neue, Helvetica, Arial, sans-serif;
    line-height: 18px;
    z-index: 100; /* zIndex should be greater than that of shadow's below */
    background: #e0e0e0;
    width: 180px; /* default width for menu */
    text-decoration: none;
    }

    .anylinkmenu ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    }

    .anylinkmenu ul li a{
    width: 100%;
    display: block;
    text-indent: 3px;
    border-bottom: 1px solid #cccccc;
    padding: 2px 0;
    text-decoration: none;
    font-weight:bold;
    text-indent: 5px;
    color: #2d3851;
    }

    .anylinkmenu a:hover{ /*hover background color*/
    background: #e9e9e9;
    color: #0066cc;
    }

    /* ######### Alternate multi-column class for drop down menus ######### */


    .anylinkmenucols{
    position: absolute;
    width: 350px;
    left: 0;
    top: 0;
    visibility: hidden;
    border: 1px solid black;
    padding: 10px;
    font: normal 12px Verdana;
    z-index: 100; /*zIndex should be greater than that of shadow's below*/
    background: #e0e0e0;
    }

    .anylinkmenucols li{
    padding-bottom: 3px;
    }

    .anylinkmenucols .column{
    float: left;
    padding: 3px 8px;
    margin-right: 5px;
    background: #E0E0E0;
    }

    .anylinkmenucols .column ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    }



    If i have other things like border, background etc in the .selectedanchor class it works. The only thing that does not work is the text color.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    is this on a live site where i can view how it is being processed?

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
  •