[CLOSED] textfield width issue

  1. #1

    [CLOSED] textfield width issue

    we are used textfield width in different property for same size, but it will be get different size

    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="Dimension.Web.Application.Presentation" %>
    <%@ 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>
        <title></title>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ScriptManager1" runat="server">
        </ext:ResourceManager>
        <div style="padding: 20px">
            <ext:TextField runat="server" Width="100" ID="TextField1" />
            <br />
            <br />
            <ext:TextField runat="server" StyleSpec="width:100px" ID="TextField2" />
        </div>
        </form>
    </body>
    </html>
    Attached Thumbnails Click image for larger version. 

Name:	sample.jpg 
Views:	90 
Size:	3.4 KB 
ID:	3205  
    Last edited by Daniil; Sep 19, 2011 at 6:29 PM. Reason: [CLOSED]
  2. #2
    Hi,

    When you set Width="100" it's width with borders and padding.

    When you set StyleSpec="width:100px" it's width without borders and padding.

    Width="100" and StyleSpec="width:100px" will be equivalent (if borders and padding are default).
  3. #3
    Yes, if you looks on the second textfield (width via css) the you will see that it has 108px width because it includes padding and borders to width
  4. #4
    Quote Originally Posted by Daniil View Post
    Hi,

    1. When you set Width="100" it's width with borders and padding.

    2. When you set StyleSpec="width:100px" it's width without borders and padding.

    3. Width="100" and StyleSpec="width:100px" will be equivalent (if borders and padding are default).
    so, how can i achieve the width to be same "point 3" ?, where do i set the border and padding to default ?
  5. #5
    Widgets don't support to set size via css. Width and Height properties must be used because size logic must be called (to apply correct size)
    You can use ASP.Net Skin files to set default width

Similar Threads

  1. [CLOSED] TextField width different in IE & other browser
    By sailendra in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 25, 2012, 6:03 PM
  2. [CLOSED] TextField 100% Width inside a Panel in a FormPanel
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 11, 2011, 10:43 AM
  3. Replies: 4
    Last Post: Oct 11, 2011, 2:14 AM
  4. [CLOSED] Tooltip width issue
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 09, 2011, 12:10 PM
  5. Replies: 6
    Last Post: Jun 11, 2010, 12:47 PM

Posting Permissions