Dimensions - A Free Tool for Measuring Screen Dimensions
Dimensions is a free browser extension that provides you with the ability to quickly measure the dimensions of web pages. It doesn't require a sign-up or any kind of registration and it's compatible with Chrome and Firefox.
The Dimensions extension comes with a keyboard shortcut, so you can start and stop measurements with the ALT + D shortcut.
If you want to measure the distance between an element and the border of another element, just simply hold the ALT key while clicking on the element, then on the element on which you want to measure. In this way, you can measure the distance of any element that's in the current viewport, not only web pages.