[CLOSED] Remove the spacing between field in a formlayout

  1. #1

    [CLOSED] Remove the spacing between field in a formlayout

    Hi,

    How would you remove the spacing between the fields in a formlayout?

    There seems to be a bottom 4px margin and a bottom 4px padding added automatically to fields to space them out nicely. What would I do to turn that off?

    p.s. this is a formlayout within a user control within an existing formlayout, it's like a child form layout, but for this section of the form no spacing is required between the fields.
    Last edited by Daniil; Jan 23, 2012 at 1:41 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I would achieve that via setting a respective CSS class to the Container's Cls.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    
        <style type="text/css">
            .no-margin-bottom .x-form-item {
                margin-bottom: 0px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Container runat="server" Layout="FormLayout" Cls="no-margin-bottom">
                <Items>
                    <ext:TextField runat="server" FieldLabel="FieldLabel" />
                    <ext:TextField runat="server" FieldLabel="FieldLabel" />
                    <ext:TextField runat="server" FieldLabel="FieldLabel" />
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>
  3. #3
    Okay, simple enough! Thanks.

    I thought there might be some property of a form layout / panel that adjusted the spacing between fields which I was missing, css is fine.

Similar Threads

  1. [CLOSED] Container Spacing
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 19, 2010, 8:12 PM
  2. [CLOSED] Form Layout Spacing in IIS
    By CMA in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 14, 2010, 8:16 AM
  3. [CLOSED] Spacing requirements inside Panel
    By jsemple in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 27, 2009, 11:22 AM
  4. Replies: 1
    Last Post: Feb 03, 2009, 6:44 AM
  5. TableLayout and cellpadding/spacing
    By houdatahbaz in forum 1.x Help
    Replies: 1
    Last Post: Jan 23, 2009, 7:17 AM

Posting Permissions