PDA

View Full Version : نحوه وسط چين كردن كنترلها در وب فرم



swallow.pa
جمعه 13 مهر 1397, 18:51 عصر
دوستان سلام
من تازه دارم با asp.net vb آشنا مي شم
اومدم كنترلها رو روي يه وب فرم پياده كردم خب خروجي كه تو گوگل كروم مي دهد طبق عكس خيلي بدجوره
سوال من اينه كه چطور كنترلها رو وسط ببرم و چطور كنترلها رو توي يه پنل بذارم كه جمع و جور بشن اينهم كدهامه


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication3.WebForm1" %>


<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Login Page</title>
<style type="text/css">
.auto-style1 {
width: 100%;
float: right;
}
.auto-style2 {
height: 32px;
}
.auto-style3 {
text-align: center;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="auto-style3">
Software</div>
<table align="center" class="auto-style1">
<tr>
<td class="auto-style2">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td class="auto-style2">
<asp:Label ID="Label1" runat="server" Text="نام"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td>
<asp:Label ID="Label2" runat="server" Text="رمز"></asp:Label>
</td>
</tr>
<tr>
<td class="auto-style2" colspan="2">
<asp:Button ID="Button1" runat="server" Text="تاييد" Width="330px" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>

Tekyegah
یک شنبه 15 مهر 1397, 23:01 عصر
سلام
بهتون پیشنهاد میدم از قالب های آماده ( bootstrap ) استفاده کنید ، که خودتون رو درگیر اینجور مسائل نکنید .

اینجا چند قالب رایگان هست : http://acdev.ir/template میتونید دانبود کنید .