Suppose that I have a that I wish to center in the browser\'s display (viewport). To do so, I need to calculate the width and height of the &l
that I wish to center in the browser\'s display (viewport). To do so, I need to calculate the width and height of the &l
&l
If offsetWidth returns 0, you can get element's style width property and search it for a number. "100px" -> 100
/\d*/.exec(MyElement.style.width)