[英]How to align Label and TextBox in C#
I need to style the aspx file. 我需要设置aspx文件的样式。
Which has Label and TextBox, but alignment for not proper. 其中具有Label和TextBox,但是对齐方式不合适。
Actually I need Lable and TextBox to be aligned side-by side with proper spacing. 实际上,我需要Lable和TextBox以适当的间距并排对齐。
<div class="col-md-12">
<p>
<asp:Label ID="Label1" runat="server" Text="Your Name : "></asp:Label>
<asp:TextBox ID="name" runat="server"></asp:TextBox>
</p>
<p>
<asp:Label ID="Label2" runat="server" Text="Your Email ID : "></asp:Label>
<asp:TextBox ID="email" runat="server"></asp:TextBox>
</p>
<p>
<asp:Label ID="Label3" runat="server" Text="Your Contact Number: "></asp:Label>
<asp:TextBox ID="mob" runat="server"></asp:TextBox>
</p>
<p>
<asp:Label ID="Label4" runat="server" Text="Select your subject : "></asp:Label>
<asp:TextBox ID="subject" runat="server"></asp:TextBox>
</p>
<p>
<asp:Label ID="label5" runat="server" Text="Your Message : "></asp:Label>
<asp:TextBox ID="message" runat="server" TextMode="MultiLine"></asp:TextBox>
</p>
<p>
<asp:Button ID="submitButton" runat="server" Text="Submit" />
<asp:Button ID="resetButton" runat="server" Text="Reset" />
</p>
</div>
<asp:TableRow>
<asp:TableCell Width="100px" Height="35px"><asp:Label></asp:Label></asp:TableCell>
<asp:TableCell><asp:TextBox></asp:TextBox></asp:TableCell>
</asp:TableRow>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.