Menu
I have an element that I grab using getElementsbyName(‘navItem1’), the element has styling in it AND it has a fixed width of 106px, but, whenever I try to grab this width it returns a NaN and when I check the returned element using Firebug, it has absolutely no styling at all ????
The code is incredibly simple:
[CODE]
var activeElems = document.getElementsByName(elem);
alert(activeElems[0].style.width);
It returns the actual element and I can set a width for it etc, but it refuses to give me the initial styling properties? Does anyone have any idea what the problem could be?
Thanks in advance