Results 1 to 8 of 8

Thread: form padding-left problem ?

  1. #1

    Default form padding-left problem ?

    Hi all

    I have a standard form panel (layout:form), and the problem is all fields by default gets 105px padding-left value. So formfields looks like:

    HTML Code:
    label text:            |                 |
                  ^^^^^^^^^
                   here padding-left value:105px;

    PHP Code:
    <div style="padding-left: 105px;" id="x-form-el-ext-comp-1138" class="x-form-element"><input type="text" name="ext-comp-1138" id="ext-comp-1138" autocomplete="off" size="20" class="x-form-text x-form-field" style="font-weight: bold; font-size: 12px;width: 100px;"/></div

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    It's to leave room for labels. The label should be in that area.

  3. #3

    Question

    I met the same problem. Is there any way to make the space smaller?
    I tried to edit "ext-all.css", changing

    .x-form-element {
    padding-left:105px;
    position:relative;
    }

    to

    .x-form-element {
    padding-left:5px;
    position:relative;
    }

    but it's no working...

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Use the form layout config options: labelWidth (defaults to 100) + labelPad (defaults to 5).

  5. #5

    Default

    Quote Originally Posted by Condor View Post
    Use the form layout config options: labelWidth (defaults to 100) + labelPad (defaults to 5).
    wow, it's working. thanks

  6. #6
    Ext JS Premium Member
    Join Date
    Jul 2010
    Posts
    3

    Default padding-left 105px of checkboxes in form

    Hi,
    I'm having the same problem with the padding of checkboxes in a CheckboxGroup. I tried configuring the labelWidth property of the formPanel layoutConfig to be 0, but it didn't work. I also tried setting the 'hideLabel' property of CheckboxGroup to be true, and it didn't work. What am I doing wrong?
    Thanks,
    Yaara

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    hideLabel:true in the CheckboxGroup config should work.

    What problem are you having with it?

  8. #8
    Ext JS Premium Member
    Join Date
    Jul 2010
    Posts
    3

    Default

    It simply doesn't cancel the padding

Posting Permissions

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