How to get the calculated border width of an element?

How can I get the computed border width of an HTML element in Javascript? (No matter where and how the border is indicated.)

+4
source share
1 answer

You want something like window.getComputedStyle() , but this is not a 100% cross-browser function - you need a little more difficulty for this .

+5
source

All Articles