extjs - center a formPanel on a normal panel
- by Ben
Hi there,
I'm using extjs and just trying to solve a simple problem:
I have a form with a fixed width. I want to Center this form within a normal Ext.Panel.
I'm trying to achieve this the 'css-way' - setting the left and right margin to 'auto'.
But this doesn' work, it seems the margins are just ignored.
The Code:
var curStateForm = new Ext.FormPanel({
title:'test',
width:300,
bodyStyle:'margin:5px auto 0 auto',
items: [edIst, edAdjust, edSumme]
});
var testPanel = new Ext.Panel({
width: '100%',
frame:true,
items:[curStateForm]
});
Thx to all!