I have a Composite using Grid Layout ( qx.ui.layout.Grid
).
However, I have to overlay an image over Grid Layout.
I managed to do it by : (c
is the Composite, while this
is Application )
c.setLayout(new qx.ui.layout.Grid());
var img = new qx.ui.basic.Image("myproject/test.png");
this.getRoot().add(img, {left: 500, top: 10});
The image is overlayed over Grid Layout successfully. However, I want the image centering at the center of the screen ( X-axis only , Y-axis is still required to be 10px from the top ), given that the Application occupies whole browser screen.
Tried :
{left: 50%}
, can't run{margin: auto}
, the image disappears
How can I make the changes ?