Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vb.net checkbox label position

Is there a way to put the checkbox to the right of the label on an asp checkbox?

This code by default places the checkbox then the label...

<asp:CheckBox CssClass="myCheckbox" ID="CBmyCheck" runat="server" Text="My label"></asp:CheckBox>
like image 791
Tom Avatar asked Jan 11 '11 14:01

Tom


2 Answers

One simple solution is create two seperate objects, one checkbox and one label. The checkbox label should be set to "" (that is nothing). The label should be set to "My Label". Place them where you want, in addition, first add the label and then place the checkmark to the right of it.

Another thing you can try is to set the TextAlign property of the checkbox:

TextAlign="Left"

like image 126
JonH Avatar answered Sep 27 '22 20:09

JonH


<asp:CheckBox TextAlign="left|right" runat="server"  />

Eg:
    <asp:CheckBox TextAlign="right" runat="server" Text = "I am right align />

    <asp:CheckBox TextAlign="left" runat="server" Text = "I am left align />
like image 25
KBBWrite Avatar answered Sep 27 '22 22:09

KBBWrite