change vertical from css to js since css way doesnt work with safari