Georg Schölly
Georg Schölly

Reputation: 126105

How to get the computed width of an element's border?

How can I get the computed border width of a HTML element in Javascript? (Independent of where and how the border is specified.)

Upvotes: 4

Views: 1659

Answers (1)

Matt Ball
Matt Ball

Reputation: 359826

You want something like window.getComputedStyle(), but that's not a 100% cross-browser function - you'll have to work a little harder for that.

Upvotes: 5

Related Questions