[CLOSED] Fieldset title and Padding property

  1. #1

    [CLOSED] Fieldset title and Padding property

    Hello,

    I noticed that padding property not only manage padding inside of fieldset but also responsible for position of feildset's title. When I try to set padding = 0, then fieldset's title located very close to border of control which is not very nice. How I can move title a bit right, but leave padding = 0 for the rest part of fieldset. Please see attached picture.

    Click image for larger version. 

Name:	2013-03-18_170555.png 
Views:	54 
Size:	20.0 KB 
ID:	5841

    Thanks,
    Alexander
    Last edited by Daniil; Mar 19, 2013 at 2:43 PM. Reason: [CLOSED]
  2. #2
    Hi Alexander,

    Hopefully, I correctly understood.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <style>
            .my-fieldset div.x-fieldset-header-text {
                margin-left: 18px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:FieldSet runat="server" Title="Title 1" Cls="my-fieldset" />
            <ext:FieldSet runat="server" Title="Title 2" Collapsible="true"   />
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil,

    Yes, you understood my right. I tried you approach and it works fine except of one moment - part of line is missed. See the attachment

    Click image for larger version. 

Name:	2013-03-18_192118.png 
Views:	31 
Size:	5.4 KB 
ID:	5843

    Thanks,
    Alexander
  4. #4
    A browser styles it. Generally, a FieldSet renders a common HTML fieldset element with a legend.
    <fieldset>
        <legend>legend</legend>
    </fieldset>
    I doubt it is possible to shift those borders.

    Maybe, moving a collapsible icon to the right could be a solution?
  5. #5
    Quote Originally Posted by Daniil View Post
    Maybe, moving a collapsible icon to the right could be a solution?
    I am sorry, I am not clear what are you suggesting to do?
  6. #6
    Please run the example.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <!DOCTYPE html>
     
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
     
        <style>
            .my-fieldset div.x-tool {
                float: right;
                margin-left: 3px;
                margin-right: 0px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
     
            <ext:FieldSet runat="server" Title="Title 1" Cls="my-fieldset" />
    
            <ext:FieldSet runat="server" Title="Title 2" Collapsible="true" Cls="my-fieldset" />
        </form>
    </body>
    </html>
  7. #7
    Hi Daniil,

    All this is good, but I do not need to move the button on fieldset. All that I want to do when you setup padding for frameset = 0, the title wouldn't be moved on the left but stay on the previous position. Your first example is something that I am looking for, but just a question - are there any possibility to draw a line that was missed before the title?

    Thanks,
    Alexander
  8. #8
    Finally I got the solution myself, the right style should be:

    .my-fieldset-header .x-fieldset-header {
    margin-left: 10px;
    }
    You can close this topic
  9. #9
    Thank you, you stopped my searching:)

Similar Threads

  1. [1.0] Fieldset padding not working
    By igitur in forum 1.x Help
    Replies: 4
    Last Post: Jan 08, 2014, 1:24 AM
  2. fieldset title
    By zhouguoguang in forum 1.x Help
    Replies: 0
    Last Post: Sep 30, 2010, 6:21 AM
  3. Fieldset padding inside a ColumnLayout
    By Coltonis in forum 1.x Help
    Replies: 0
    Last Post: Jul 09, 2010, 1:13 AM
  4. FieldSet title shifting when expanding/collapsing
    By dbassett74 in forum 1.x Help
    Replies: 4
    Last Post: May 06, 2009, 1:15 PM
  5. set Title in Fieldset dynamically
    By jmilton in forum 1.x Help
    Replies: 4
    Last Post: Mar 27, 2009, 4:39 PM

Posting Permissions