Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Link Colour

Recommended Posts

Hey all,i dont know how easy this is to do or whether it can be done just using HTML or whatever. Basically i have 2 seperate navigation barstop nav bar is the parent navigation bar. when you hover over any of the entries in this parent bar it dynamically updates the second nav bar. what i ideally want is to highlight the parent link in black when i move the mouse over it BUT stay black until i select/ hover over another parent link.does that make sense?

Share this post


Link to post
Share on other sites

The only way i can think of doing that is to make a JavaScript funtion for the mouseover on the parent that would change the color of the current item to black, revert the old item to its original color, and then save the current item (window.document.<etc>) to the old item variable. Therefore, this function would only change the color if a new one is hovered because if it is the same one, nothing would end up changing. If you need help doing this PM me or something cause i could help you with the function if you do not know javascript

Share this post


Link to post
Share on other sites

There is a way of dong it i suppose. All you have to do is use CSS and the <span> tag.

<head><style type="text/css">.menu1 a:link {	text-decoration: underline;	color: #66CC99;	}.menu1 a:visited {	text-decoration: underline;	color: #66CC99;	}.menu1 a:hover {	text-decoration: none;	color: #333333;	background-color: #FFFFFF;	}.menu1 a:active {	text-decoration: underline;	color: #66CC99;	}</style></head><body><span name="menu1"> kjslkajd..... </span>and the rest of your html...



there i think that should be abour right. you can make as many span tags as you want as long as you choose a diff name for each.

Share this post


Link to post
Share on other sites

What sxyloverboy said will highlight it black, but when you take the mouse off it will revert back to normal. I think the best way to do it would be to use Javascript, but I don't really know it that well.

Share this post


Link to post
Share on other sites

What sxyloverboy said will highlight it black, but when you take the mouse off it will revert back to normal. I think the best way to do it would be to use Javascript, but I don't really know it that well.

152288[/snapback]


ok the colors are wrong. just change them to what you want it to be. (assuming you know how to)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.