Adjust faulty zIndex,with,height and offset calculation