Results 1 to 2 of 2

Thread: Font-size doesn't change on fieldlabel with custom class

  1. #1

    Default Font-size doesn't change on fieldlabel with custom class

    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

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Vienna, Austria
    Posts
    59

    Default

    Hi,

    how about something like this:

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •