scobrakid Posted May 21, 2011 Share Posted May 21, 2011 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 More sharing options...
Ingolme Posted May 21, 2011 Share Posted May 21, 2011 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 More sharing options...
scobrakid Posted May 22, 2011 Author Share Posted May 22, 2011 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.