Professional Web Applications Themes

Question: TextBox - Can't Align Center - ASP.NET General

I cant 'align center' a text box. First of all, all the justifications (left, center, right) on the toolbar are dimmed. Why? Also, when I try to do it through HTML (wrapping the control in a <p align="center"><asp:TextBox ...></p>) this doesn't work either. Any ideas? Thanks....

  1. #1

    Default Question: TextBox - Can't Align Center

    I cant 'align center' a text box.

    First of all, all the justifications (left, center, right) on the toolbar
    are dimmed. Why?

    Also, when I try to do it through HTML (wrapping the control in a <p
    align="center"><asp:TextBox ...></p>) this doesn't work either.

    Any ideas?

    Thanks.


    VB Guest

  2. #2

    Default Re: Question: TextBox - Can't Align Center

    Do you want the text in the text box to be centered in the textbox? If so I
    don't think HTML supports this.
    <P align="center"><asp:TextBox id="TextBox1"
    runat="server"></asp:TextBox></P>

    This works for me.

    Perhaps other areas on the page are throwing off the alignment?


    "VB Programmer" <com> wrote in message
    news:phx.gbl... 


    Francis Guest

  3. #3

    Default Re: Question: TextBox - Can't Align Center

    You can either give your textbox a CSS class:

    // Class Method
    ..MyTextBox {
    text-align: center;
    }

    Alternatively, you could simply apply the following style to the textbox:

    MyTextBox.Attributes.Add("style","text-align: center")

    --
    Tony Williams
    www.bigtone.net

    "Francis Shanahan" <francisshanahan.com> wrote in
    message news:%phx.gbl... 
    I [/ref]
    toolbar 
    >
    >[/ref]


    Anthony Guest

  4. #4

    Default Re: Question: TextBox - Can't Align Center

    I just highlight it like you would to a paragraph in MS word, the buttons
    will become undimmed.


    "VB Programmer" <com> wrote in message
    news:phx.gbl... 


    Grant Guest

Similar Threads

  1. Page shifts when using center align...
    By ba-doyn in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: July 17th, 07:19 PM
  2. Replies: 4
    Last Post: March 15th, 11:34 AM
  3. popup-menu labels align=center
    By Bill McCormick in forum PERL Modules
    Replies: 1
    Last Post: August 27th, 03:13 PM
  4. Replies: 2
    Last Post: July 25th, 08:32 AM
  5. Replies: 3
    Last Post: July 23rd, 07:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139