var viewPort = new Ext.Viewport({
renderTo:'body',
layout: {
align: 'middle',
pack: 'center',
type: 'hbox'
},
items:[new Ext.Panel({
title: 'hi',
width: 200,
height: 200,
style: 'margin:0 auto;margin-top:100px;'
})]
});
refs:
1. http://stackoverflow.com/questions/11672401/center-a-form-panel-in-the-screen
2. http://stackoverflow.com/questions/6570478/how-to-align-grid-panel-in-center