0

Using extjs, I have a formPanel with a fixed width. I want to Center this form within a normal wep page so the form keep appears in the center even i minimize the browser. i didn't use an outer container, just a simple form panel with html/css page. so the following wouldn't work in my case:

layout: {
        type: 'vbox',
        align: 'center',
        pack: 'center'
    },
    items: [{
        title: 'Centered Panel',
        width: 200,
        height: 200
    }]

1 Answer 1

0

Use two other containers (left and right) with flex = 1 and change the layout to hbox:

layout: {
    type: 'hbox'
},
items: [{
    xtype: 'container',
    flex: 1
},{
    title: 'Centered Panel',
    width: 200,
    height: 200
},    {
    xtype: 'container',
    flex: 1
}]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.