Get style.width when the property is set with the class name

How can you get the style.width property if it is set with the class name?

+1
source share
1 answer

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.

+1
source

All Articles