switched css flexbox positioning to use js

Might be worth righting for browsers with and without flex