Hello Andreas,
you can take HBox layout and add two spacers to the edges. The middle part
can have a fixed width which is exactly what you want (i guess).
Take a look at the following code, which you can test in the online
playground:
http://demo.qooxdoo.org/devel/playground/
// create a composite for the whole document
var composite = new qx.ui.container.Composite();
composite.setBackgroundColor("red");
// add it to the document with all edges 0
this.getRoot().add(composite, {left: 0, right: 0, top: 0, bottom: 0});
// set a horizontal box layout
composite.setLayout(new qx.ui.layout.HBox());
// add the first spacer with a flexible width
composite.add(new qx.ui.core.Spacer(), {flex: 1});
// add the inner composite with a fixed width
var innerComposite = new qx.ui.container.Composite();
innerComposite.setWidth(100);
innerComposite.setBackgroundColor("black");
composite.add(innerComposite);
// add a second spacer with a flexible width
composite.add(new qx.ui.core.Spacer(), {flex: 1});
Regards,
Martin
Andreas G. wrote:
>
> hello there!
>
> im trying to build a layout with a container of 940px of width. this
> container must be centred horizontally.
>
> something like this: http://e4e.emubase.de
>
> thanks for helping in advance!
>
> cheers
>
--
View this message in context:
http://n2.nabble.com/centering-a-container-fixed-width-tp3625069p3625567.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel