Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to align text to center in asp label

Tags:

html

asp.net

I have a label in which i need to align the text to center ,I have tried this

 <asp:Label ID="Label3" runat="server" Text="ABC" style="text-align:center" Font-Bold="true" Font-Size="X-Large" CssClass="StrongText"></asp:Label>

But it not works..

like image 307
Chow.Net Avatar asked Dec 10 '12 08:12

Chow.Net


Video Answer


1 Answers

<div style="margin-left: auto; margin-right: auto; text-align: center;">
    <asp:Label ID="Label3" runat="server" Text="ABC" Font-Bold="true" Font-Size="X-Large"
        CssClass="StrongText"></asp:Label>
</div>
like image 121
Gregor Primar Avatar answered Sep 18 '22 13:09

Gregor Primar