changed the bottom middle alignment to use targetElementOffset instead