PDA

View Full Version : How can I make the title of fieldset align in the center?



admire
14 Sep 2009, 8:32 PM
I want to give a title to some components,so put them in a fieldset without border.
but the problem is that the title of fieldset align left default.How can I make it in the center?


xtype: 'fieldset',
border: false,
title: '<div style="font-size:15px;color:#FF7200">' + self.title + '</div>',
bodyStyle: Redkit.styles.FieldsetBordyStyle,
items: !flag ? [{
autoHeight: true,
collapsible: true,
labelAlign: 'left',
layout: 'form',
items: componentArray

}] : [{
labelAlign: 'left',
layout: 'column',
items: [{
layout: 'form',
labelAlign: 'left',
border: false,
columnWidth: .5,
bodyStyle: Redkit.styles.FieldsetBordyStyle,
items: componentArrayLeft
}, {
layout: 'form',
labelAlign: 'left',
border: false,
columnWidth: .5,
bodyStyle: Redkit.styles.FieldsetBordyStyle,
items: componentArrayRight
}]
}]

admire
14 Sep 2009, 10:47 PM
I've trid to add css tag text-align:center in title's value,but it didn't work