fix panning on firefox (bonus! made the css cleaner)