How can I get the computed border width of a HTML element in Javascript? (Independent of where and how the border is specified.)
- Can the four sides have different widths or will they be set constantly to the same width?Pekka– Pekka2010-08-25 19:20:16 +00:00Commented Aug 25, 2010 at 19:20
- @Pekka: Yes, they can have different widths.Georg Schölly– Georg Schölly2010-08-25 19:44:07 +00:00Commented Aug 25, 2010 at 19:44
Add a comment |
1 Answer
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.