public static int getRelativeX(final NativeEvent e, final Element target) {
        return e.getClientX() - target.getAbsoluteLeft() + target.getScrollLeft()
                + target.getOwnerDocument().getScrollLeft();
    }
Gets the mouse x-position relative to a given element.

@param target the element whose coordinate system is to be used
@return the relative x-position
stroom-core-client-widget/src/main/java/stroom/data/grid/client/MouseHelper.java