Hi,
I've been working on a solution for a couple of hours now with little result.
The basic action I want javascript to do on an event is to change the css margin-right property of an anchor element.
The HTML
The CSSCode:<a name="selector1" id="selector1" href="#" onmouseover="select('1')" onmouseout="deselect('1')"><img src="image.gif" /></a>
The javascriptCode:margin-right:-135px;
or possiblyCode:function select(prop) { link = document.getElementById('selector'+[prop]); // selects the element for manipulation link.style.cssText = "margin-right:-160px;"; }
neither of these solutions work. I work with IE7 and it doesn't pick up CSS's margin-right. The attribute shows up in Firebug but nothing happens on the screen.Code:function select(prop) { link = document.getElementById('selector'+[prop]); // selects the element for manipulation link.style.marginRight="32px"; }



Reply With Quote


Bookmarks