首页 新闻 会员 周边

extjs tabpanel 中的formpanel居中

0
悬赏园豆:20 [待解决问题]

请教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()
});
View Code

对于这段代码在chrome,firefox为什么会有不一样的显示

weipan的主页 weipan | 初学一级 | 园豆:178
提问于:2014-01-05 12:42
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册