How can you get the style.width property if it is set with the class name?
It looks like you need the calculated width of the node, which is its physical width after applying all the styles.
See here for this.
As you can see, it elementNode.offsetWidthseems the most portable.
elementNode.offsetWidth