Question: I'm making some mini-games with html5 and jQuery. They can be played on different platforms like pc or iOS or Android. I want to show the full content with fixed aspect ratio on different resolutions.

I can scale a specific object with .width() and .height(), but I'm not sure there is a better way to scale the whole content automatically, in stead of accessing every components and change their scale and position one by one.

Thank you.

Answer: 
You could try css [transform:scale()](http://www.w3schools.com/css3/css3_2dtransforms.asp)
Maybe 'find' using the unversal selector \* will work? If \* is too heavy handed try selecting individual elements as required.

```
var scaling = .5;
$('#someElement').find('*').each(function () {
    var fSize = Number($(this).css('fontSize').replace(/[^0-9\.]+/g, ""));
    $(this).outerWidth($(this).outerWidth() * scaling);
    $(this).css('fontSize', fSize * scaling));
});

```