Click
  1. Click
  2. CLK-595

Can't apply to TextField label the same style as the one assigned to the Control

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0 RC1
    • Fix Version/s: 2.2.0
    • Component/s: core
    • Labels:
      None
    • Environment:
      tomcat on linux

      Description

      I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
      TextField cld = new TextField("cld", "My Text Field: ");
      cld.setSize(20);
      cld.setRequired(false);
      cld.setStyle("margin-bottom", "20px");
      form.add(cld);

      the resultant html code (generated putting $form in the html) is:

      <td class="fields" align="left"><label for="form_cld">My Text Field: </label> </td>
      <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>

      As you can see the style is applied to the intput text, but not to its label.

      This generate a very ugly page, where all the label are rendered not near the fields they refer to.

        Activity

        Stefax created issue -
        Bob Schellink made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Bob Schellink made changes -
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Fix Version/s 2.2.0 [ 12314164 ]
        Bob Schellink made changes -
        Resolution Won't Fix [ 2 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Bob Schellink made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Stefax
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development