ExtJS textfield with LabelAlign Top (CENTER)

extjs, extjs4, extjs4.1, textfield

Solution

Just add a class to the label using `labelClsExtra`:

An optional string of one or more additional CSS classes to add to the label element. Defaults to empty.

For example:

labelClsExtra: 'your-class'

And in your style sheet:

.your-class {
    text-align: center
}

Working example: http://jsfiddle.net/qazN3/

Problem

Is there any config option to put the lavel on top with center align for a textfield. ``` { xtype:'numberfield', labelAlign:'top', labelSeparator:'', fieldLabel: 'Title', flex:1 } ``` Its working fine with label on top but aligned to left. I want to be centeraligned with top. Thanks for your help in advance!!!

Original source