View Full Version : AnyLink CSS Menu Hover Color Issues
HaroldM
08-19-2008, 02:49 PM
Ok for some reason when I change the color of the hover color the menu no longer shows a hover color. If I leave it black (as shown below in the default code) it hovers black. Change it to any other color and I get nothing. Any ideas?
.anylinkcss a:hover{ /*hover background color*/
background-color: black; <--- Change this and you get no hover color.
color: white;
}
}
Script URL: http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm
It works fine for me even when I change the color, hex, or rgb. They all work. Although there is a problem with the script in the css. The problem is that ddadmin added two curly brackets, instead of one. It may be a problem with your browser, although It did work in mine, FF 3, IE 7, Safari. All of them. So find this in your code:
.anylinkcss a:hover{ /*hover background color*/
background-color: black; <--- Change this and you get no hover color.
color: white;
}
And change it to this:
.anylinkcss a:hover{ /*hover background color*/
background-color: black; <--- Change this and you get no hover color.
color: white;
}
I hope this helps,
Nile
HaroldM
08-19-2008, 04:11 PM
I must be missing something because my code and what you told me to replace it with look identical.
Oh, I'm sorry. Thats my mistake. :)
Find:
.anylinkcss a:hover{ /*hover background color*/
background-color: black; <--- Change this and you get no hover color.
color: white;
}
}
And delete the highlighted.
That was my mistake. :)
HaroldM
08-19-2008, 04:38 PM
Ok so wanna know what's odd? I did what you said. I changed the hover color to yellow. Works. I change it to white. Nothing. :(
Weird. Did yellow work before? Also. Try white as: #FFFFFF, if you don't know what this is its called a hex #. You can find out all the colors in hex and rgb here:
http://www.dynamicdrive.com/dynamicindex11/yuicolorpicker/index.htm
HaroldM
08-19-2008, 04:45 PM
Never tried yellow before. It works now. As does most every other color I try. EXCEPT white. WTF? Even tried it with #FFFFFF and no luck. Tried like #CCCCCC and it works. :(
Now try in rgb:
rgb(255,255,255);
HaroldM
08-19-2008, 04:53 PM
LOL! No luck. Tried rgb(255,0,255); and I get a nice purplish hover color though. So are you starting to wonder WTF is going on? :)
No:
rgb(255,255,255);
Not:
rgb(255,0,255);
That one wasn't my mistake. :) If we can't do it in this, I must be able to find something in the javascript.
HaroldM
08-19-2008, 05:11 PM
I know you said 255,255,255 I was just saying I tried that and it didn't work. I was saying I tried 255,0,255 and that worked giving a purplish hover color.
Ok, I see, change the background color to #FFFFFF.
And in your code in the submenus were you have, or something similar to:
<div id="anylinkmenu2" class="anylinkcss" style="width: 150px; background-color: lightyellow">
<a href="http://www.cnn.com/">CNN</a>
<a href="http://www.msnbc.com">MSNBC</a>
<a href="http://www.google.com">Google</a>
<a href="http://news.bbc.co.uk">BBC News</a>
</div>
You can try changing it to:
<div id="anylinkmenu2" class="anylinkcss" style="width: 150px; background-color: lightyellow">
<a href="http://www.cnn.com/" onmouseover="this.style.background='#FFF'" onmouseout="this.style.background='lightyellow';">CNN</a>
<a href="http://www.msnbc.com" onmouseover="this.style.background='#FFF'" onmouseout="this.style.background='lightyellow';">MSNBC</a>
<a href="http://www.google.com" onmouseover="this.style.background='#FFF'" onmouseout="this.style.background='lightyellow';">Google</a>
<a href="http://news.bbc.co.uk" onmouseover="this.style.background='#FFF'" onmouseout="this.style.background='lightyellow';">BBC News</a>
</div>
HaroldM
08-19-2008, 05:52 PM
Ok so that works. But mind you I'm curious why won't the other method work when I use the color white, #FFFFFF, or 255,255,255?
I've got no clue. The point is, it works. :)
HaroldM
08-19-2008, 06:56 PM
Thanks so much for your help!
HaroldM
08-28-2008, 05:25 PM
Ok so I've got a new problem. I moved this clients site to their server. Same webhost as me so that's not the cause. But for some reason the drop down menus do NOT work on the client's site but they do on mine. See links below. PLEASE help as this site is to get launched in a couple of weeks and I'm racking my brain here on how to fix this.
Site where menus DO work: http://www.hemdesigns.com/ico/wp/
Site where menus DON'T work: http://newtoniowa.com/blog/
EDIT: Chalk this one up to user error. :) There was one line of code causing my issue. In my Wordpress theme code I had <script type="text/javascript" src="../wp/wp-content/themes/ico/anylink.js"> but I forgot to notice that the wp should be blog as I didn't use the directory name wp on the client's site. Sorry about that.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.