adding support for all elements (not just links)
and fixing position problems when using with any type of element