[CLOSED] Button padding

  1. #1

    [CLOSED] Button padding

    Hi,

    I want to be able to have equal distance from the left end of the button to the first letter in the button and from the last letter in the button text to the right end of the button.

    What styling can be used to achieved this?

    the text in the button is localized and can be varying length but I want to maintain the same margin from the button text to the button's borders.

    Regards
    Last edited by Daniil; Oct 06, 2011 at 3:27 PM. Reason: [CLOSED]
  2. #2
    Hi,

    As far as I can understand you need
    text-align: center;
    but it's by default.

    Can you provide more details? Maybe screen-shot.
  3. #3
    That is not what I need.
    I described the problem is plan english. I do not know what other explanation you need.

    I want to set the style of the button so that the distance between the text and the border is the same. I want to be able to assign my own value for margin. I want to be able to say I want the margin to be 10 px. and also I want to be able to set the distance to 100 px.

    I know
    text-align: center; will set the text centralized but I want to set what the distance is as an interger value.


    I hope this is clear enough

    Regards
  4. #4
    Here you are.

    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">
            .my-button BUTTON {
                margin-left: 20px;
                margin-right: 20px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Button runat="server" Text="Test" Cls="my-button" />
        </form>
    </body>
    </html>
  5. #5
    Still testing this. its behaving strangely
  6. #6
    Can you provide a sample?

    Maybe you can just set a respective .Width?

Similar Threads

  1. Pie Chart Padding
    By cwolcott in forum 2.x Help
    Replies: 3
    Last Post: Jan 17, 2012, 5:30 AM
  2. [CLOSED] Specify padding on left and right for FormPanel
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 20, 2011, 2:55 PM
  3. [CLOSED] [1.0] GridPanel Cell Padding?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 05, 2011, 6:27 PM
  4. Button in table rendering problem ( padding )
    By ulrikn in forum 1.x Help
    Replies: 1
    Last Post: Aug 31, 2010, 7:49 PM
  5. [CLOSED] [1.0] Portal Column Padding
    By tansu in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 07, 2010, 4:35 PM

Posting Permissions