use width calculation that holds valid for both standard browser and mobile devices