implemented support for offsetTop and offsetBottom