Fixes placement error of long horizontal navs on small screens

On small screens like iPhones, the navigation would break, and the function for calculating margin for the nav would get the wrong result, thus placing it wrong. Simple fix.