Use 'getBoundingClientRect' to get element position and dimensions.

Closes #114.
Fixes #79.
Fixes #119.
Fixes #149.
Fixes #166.
Fixes #167.