View Full Version : Help with Any Link Menu v2.2
justo
10-11-2009, 11:38 PM
The Any Link Menu at http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.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.
bluewalrus
10-12-2009, 03:30 AM
The anchor link is:
.selectedanchor{
color:#00ff00;
}
The links that expands and is selected on is:
.anylinkmenu a:hover {
color:#00ff00;
}
justo
10-12-2009, 10:43 AM
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.
bluewalrus
10-13-2009, 01:44 AM
is this on a live site where i can view how it is being processed?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.