PDA

View Full Version : Font-size doesn't change on fieldlabel with custom class



BKrisz79
9 Dec 2007, 6:27 AM
I have a simple problem. I have a formpanel and some textfield with fieldlabel. I try to change the style of the fieldlabel. If I do it with labelStyle: 'font-size:10px;color:#ff0000;' it works fine, but I would like to do it with class. I named the class "labelcss".

with addstyle("labelcss"): just the color change the size doesn't.
with cls property of textfield: just the color of the textfield change, the size doesn't
with ctCls: nothing change
with fieldClass: the text field change fine (color, size), but label doesn't show any changes
withitemCls: just the color change on the fieldlabel size doesn't.

Can somebody tell me how I can change the fieldlabel font-sizesize, font-style with css class. (I don't want to override the original one in ext-all.css)

Thnx

tellioglu
9 Dec 2007, 7:02 AM
Hi,

how about something like this:


var label = Ext.DomQuery.selectNode('label[@for=postal-code-field]');
Ext.DomHelper.applyStyles(label, 'font-weight: bolder');