I am trying to set the margin of an object from JavaScript. I am able to do it in Opera & Firefox, but the code doesn't work in Internet Explorer.
Here is the JavaScript I have:
function SetTopMargin (ObjectID, Value)
{
document.getElementById(ObjectID).style.marginTop = Value.toString() + "px";
}
And it is called like this:
SetTopMargin("test_div_id", 100);
So does anyone know some code that will work in Internet Explorer?
Thanks.