Scale html canvas


I try to scale a html canvas

<style type="text/css">
    zoom: 2.2;
    -moz-transform-origin: top left;
    -moz-transform: scale(2.2);

<div id="my_openFl_div"></div>
<script type="text/javascript">
    lime.embed ("MyOpenFlDiv", "my_openFl_div", 80, 110, { parameters: {} });

“zoom” property doesn’t work on Firefox, I tried “transform” but the “div” is not correctly positionned


It seems that the zoom property is considered to be “non-standard” and one should use the transform: scale CSS property instead. There is an interesting discussion on Stack Overflow about difficulties doing this to a canvas.
I question whether that is the best way to enlarge an OpenFL canvas. My approach would be to simply set the width and height of #my_openFl_div and have OpenFL respond to size changes with a stage listener, for example:

stage.addEventListener (Event.RESIZE, stage_onResize);
function stage_onResize(e:Dynamic){
    mySprite.width = stage.stageWidth;
    mySprite.height = stage.stageHeight;

In other news, I have been using the Advanced Layout library and liking it.
I hope that helps!