title: Scaling CSS relative to window
body: <p>Just wondering if theirs a more efficient means of doing this?</p>
  
  <pre><code>$(window).resize(function()                                                                   
  {                                                                                             
      $('.title').css('font-size',Math.floor($(window).width()*0.2)+'px');                         
      $('.title').css('background-size',Math.floor($(window).width()*0.5)+'px');                   
      $('.title').css('padding',($(window).width()*0.1)+'px 0px '+($(window).width()*0.1)+'px');   
  });  `               
  </code></pre>
  
  <p>I'm doing this to get my web applicatiion (cordova/phonegap) to resize properly for all devices. I've tried using viewport and had mixed results especially when it came to getting text to scale relative to <code>dpi</code> and screen dimensions.</p>