Web Label Control - Align:Center

Discussion in 'ASP .Net Web Controls' started by Alan Z. Scharf, Aug 4, 2003.

  1. 1. Is there a way to center align the web label control in asp.net or
    programatically in C#.?

    2. If I attach the label to a CSS with alignment:center it works, but I
    don't see a property or attribute to set directly.

    Thanks.

    Alan
    ___________________________
    Alan Z. Scharf
    GrapeVine Systems
    New York City
     
    Alan Z. Scharf, Aug 4, 2003
    #1
    1. Advertising

  2. myControl.HorizontalAlign = HorizontalAlign.Center


    >-----Original Message-----
    >1. Is there a way to center align the web label control

    in asp.net or
    >programatically in C#.?
    >
    >2. If I attach the label to a CSS with alignment:center

    it works, but I
    >don't see a property or attribute to set directly.
    >
    >Thanks.
    >
    >Alan
    >___________________________
    >Alan Z. Scharf
    >GrapeVine Systems
    >New York City
    >
    >
    >.
    >
     
    Patrick Beaudoin, Aug 4, 2003
    #2
    1. Advertising

  3. Actually, to center a web form label, one needs to add to the style
    attribute:

    style="TEXT-ALIGN:center";

    Alan
     
    Alan Z. Scharf, Aug 5, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. terry
    Replies:
    0
    Views:
    400
    terry
    Jul 24, 2003
  2. Tom Bernsen

    Center Align Label and Hyperlink Control

    Tom Bernsen, Apr 22, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    17,853
    Ken Cox [Microsoft MVP]
    Apr 23, 2004
  3. Rabbit
    Replies:
    1
    Views:
    2,758
    Shimon Sim
    Feb 12, 2006
  4. Steve Richter
    Replies:
    1
    Views:
    904
    Mark Rae
    Jun 24, 2007
  5. Knut Krueger
    Replies:
    8
    Views:
    280
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page