mikacruz
06-02-2009, 10:54 AM
Hello all,
I have a problem with defining a class for particular <a>
If you look at this page (http://www.europeoples.eu/), you will see the menu. If you hover a word and go down along the drop down, then the color for the <a> reverts to browser default, something which does not happen if you over the word and then go straight to another without going down along the drop.. you see what I mean?
Maybe it is an issue with the javascript.... When I applied the a:hover to the whole list, such issue did not appear...
I hope someone of you understand the issue :-)
here is the html:
<div id="menu_bar">
<ul id="menu">
<li><a class="men_grey" href="#">Home</a>
<ul>
<li><a href="#">home page</a></li>
<li><a href="#">about site</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">contact</a></li>
</ul>
</li>
<li><a class="men_black" href="#">hello</a>
<ul>
<li><a href="#">log in</a></li>
<li><a href="#">post query</a></li>
<li><a href="#">register</a></li>
<li><a href="#">search offers</a></li>
</ul>
</li>
<li><a class="men_black" href="#">hello</a>
<ul>
<li><a href="#">log in </a></li>
<li><a href="#">register </a></li>
<li><a href="#">post offer</a></li>
<li><a href="#">bulk upload </a></li>
</ul>
</li>
<li><a class="men_grey" href="#">hello</a>
<ul>
<li><a href="#">search guide</a></li>
<li><a href="#">leave comment</a></li>
<li><a href="#">all year long </a></li>
</ul>
</li>
</ul>
</div>
here is the css:
#menu_bar
{
background: transparent url("");
height: 45px;
}
#menu {margin-left:250px;}
#menu li {
float: left;
display: block;
font-size: 10pt;
padding: 1px 13px 0px 0;
width:120px;
}
#menu li a {
padding: 4px 0px;
display: block;
font-weight: bold;
text-align:center;
}
#menu li ul {
left : -999em;
position : absolute;
padding-bottom:12px;
padding-top:6px;
padding-left:0px;
z-index:950;
background:transparent url("") no-repeat scroll 0 bottom;
}
#menu li ul li { float : none; margin-left:6px;}
#menu li ul a {
width : 100px;
padding-left:10px;
font-weight : normal;
padding-bottom:1px;
padding-top:2px;
text-align:left;
color:grey;
}
#menu li ul a:hover {
color: orange;
border-bottom: 1px solid #C9C9C9;
border-top: 1px solid #C9C9C9;
}
#menu li:hover ul, #menu li.sfhover ul {
left: auto;
visibility: visible; /*IE fix for stickiness*/
}
a.men_grey, a.men_grey:visited
{
color:grey;
}
a.men_grey:hover, a.men_grey:active
{
color: orange;
}
a.men_black, a.men_black:visited
{
color:black;
}
a.men_black:hover, a.men_black:active
{
color: orange;
}
Thanks a lot for having a look,
Michael
I have a problem with defining a class for particular <a>
If you look at this page (http://www.europeoples.eu/), you will see the menu. If you hover a word and go down along the drop down, then the color for the <a> reverts to browser default, something which does not happen if you over the word and then go straight to another without going down along the drop.. you see what I mean?
Maybe it is an issue with the javascript.... When I applied the a:hover to the whole list, such issue did not appear...
I hope someone of you understand the issue :-)
here is the html:
<div id="menu_bar">
<ul id="menu">
<li><a class="men_grey" href="#">Home</a>
<ul>
<li><a href="#">home page</a></li>
<li><a href="#">about site</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">contact</a></li>
</ul>
</li>
<li><a class="men_black" href="#">hello</a>
<ul>
<li><a href="#">log in</a></li>
<li><a href="#">post query</a></li>
<li><a href="#">register</a></li>
<li><a href="#">search offers</a></li>
</ul>
</li>
<li><a class="men_black" href="#">hello</a>
<ul>
<li><a href="#">log in </a></li>
<li><a href="#">register </a></li>
<li><a href="#">post offer</a></li>
<li><a href="#">bulk upload </a></li>
</ul>
</li>
<li><a class="men_grey" href="#">hello</a>
<ul>
<li><a href="#">search guide</a></li>
<li><a href="#">leave comment</a></li>
<li><a href="#">all year long </a></li>
</ul>
</li>
</ul>
</div>
here is the css:
#menu_bar
{
background: transparent url("");
height: 45px;
}
#menu {margin-left:250px;}
#menu li {
float: left;
display: block;
font-size: 10pt;
padding: 1px 13px 0px 0;
width:120px;
}
#menu li a {
padding: 4px 0px;
display: block;
font-weight: bold;
text-align:center;
}
#menu li ul {
left : -999em;
position : absolute;
padding-bottom:12px;
padding-top:6px;
padding-left:0px;
z-index:950;
background:transparent url("") no-repeat scroll 0 bottom;
}
#menu li ul li { float : none; margin-left:6px;}
#menu li ul a {
width : 100px;
padding-left:10px;
font-weight : normal;
padding-bottom:1px;
padding-top:2px;
text-align:left;
color:grey;
}
#menu li ul a:hover {
color: orange;
border-bottom: 1px solid #C9C9C9;
border-top: 1px solid #C9C9C9;
}
#menu li:hover ul, #menu li.sfhover ul {
left: auto;
visibility: visible; /*IE fix for stickiness*/
}
a.men_grey, a.men_grey:visited
{
color:grey;
}
a.men_grey:hover, a.men_grey:active
{
color: orange;
}
a.men_black, a.men_black:visited
{
color:black;
}
a.men_black:hover, a.men_black:active
{
color: orange;
}
Thanks a lot for having a look,
Michael