Jump to content

A:Hover Problem for two div id's: CSS or JSP?


scobrakid
 Share

Recommended Posts

Hi all. First post. Newbs rock.I am having trouble with an effect I'm trying to accomplish.I want large block links to change background on a:hover AND change the background of another specific block (does not have to be link).Can this be done using CSS or will I have to write javascript for it?Here's the site: http://www.roscoey.com/Essentially, I want the highlighted areas to change the sign's image (page titles/navigation).Any advice is greatly appreciated, thank you.

Link to comment
Share on other sites

You can use a CSS hover for the links, but you'll need to attach an onmouseover and onmouseout event for the other elements, unless those elements are child nodes of the link.

Link to comment
Share on other sites

You can use a CSS hover for the links, but you'll need to attach an onmouseover and onmouseout event for the other elements, unless those elements are child nodes of the link.
function mouseOverProjects() {  document.getElementById("sign").style.backgroundImage="url('img/projects.png')";}

and

<a href="projects.html" 			onmouseover="mouseOverProjects()"			onmouseout="mouseOut()" ></a>

fixed it right upThanks!

Link to comment
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
 Share

×
×
  • Create New...