请教extjs4中 tabpanel 中的formpanel居中问题.如何居中显示并且width固定不变.
Ext.create('Ext.tab.Panel', {
width: 900,
layout:'fit',
activeTab: 0,
items: [
Ext.create('Ext.form.Panel',{
title:'test',
style:{border:'1px solid red;',width:'700px !important',margin:'0px auto'},
items:[
{
xtype: 'hiddenfield', //1
name: 'hiddenfield1',
value: 'Hidden field value',
allowBlank:false
},
{
xtype: 'displayfield', //2
name: 'displayfield1',
fieldLabel: 'Display field',
value: 'Display field <span style="color:red;">value</span>'
}
]
})
],
renderTo : Ext.getBody()
});
对于这段代码在chrome,firefox为什么会有不一样的显示