hi i have a big windows with a form in it and some text fields.by default labels are aligned to the left and their input boxes are aligned to center. Is there a way to stick input boxes to their labels in left? Is there any tutorial on how to work with css on extjs?
hi i have a big windows with a form in it and some text fields.by default labels are aligned to the left and their input boxes are aligned to center. Is there a way to stick input boxes to their labels in left? Is there any tutorial on how to work with css on extjs?
Share Improve this question asked Feb 26, 2011 at 3:32 Mehdi FanaiMehdi Fanai 4,06913 gold badges53 silver badges76 bronze badges 1- There are many ways to affect the placement of fields and their labels, but it would be much easier to help if you included your form code in the question. – Tommi Commented Feb 26, 2011 at 6:28
2 Answers
Reset to default 5Use:
labelAlign : 'right'in your form config. for example:
var form = new Ext.form.FormPanel({ height : 200, width : 250, labelAlign : 'right' labelWidth : 80, //because my fieldlabel is short enough items : [{ fieldLabel : 'Name', .... }, ....] })
Concerning your question on CSS: You won't be able to reposition Components contained in a Container with a FormLayout, unless you use !important
all over the place.
This is because the layout sets the child ponents' dom style
properties at render time.