Hi,
When I created my game Orbium I did a lot of work regarding getting it to scale from the smallest mobile screens to computer desktops
https://github.com/bni/orbium
Maybe reading this code can be of help to you? Code dealing with this is in https://github.com/bni/orbium/blob/gh-pages/js/init.js