This article will show you how you can assign the border to
a table. In this I have used border and border-collapse using css.
Some of my previous articles are as follows: Add
Remove Or Change Css Class Using jQuery In Asp.Net, Css
Class Change of Button On Radiobutton Selection In Asp.Net Using jQuery, Use
Of Css To Show Image However Effect In Asp.Net, Resize
Image On The Bases Of Browser Size Using Css In Asp.Net, Add,
Remove, Validate CSS Class Applied To a HTML Control In Asp.Net Using jQuery.,
CalendarExtender
Example With Custom Style By Css Uaing Asp.net and Css, Dynamic
Vertical Css Menu Using jQuery, Css and C#.net In Asp.net MVC, Responsive
Gri Design Example Using Css in Asp.Net MVC,HTML.
So here is the code to assign border to the table.
So here is the code to assign border to the table.
<table width="30%" cellpadding="5" cellspacing="5" style="border: 1px solid black;border-collapse: collapse;">
<tr>
<td align="right">
</td>
<td align="left">
<asp:ValidationSummary
ID="ValidationSummary1"
runat="server"
ForeColor="#FF3300"
/>
</td>
</tr>
<tr>
<td align="right">
User Id :
</td>
<td align="left">
<asp:TextBox ID="txtUserId"
runat="server"
Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="txtUserId"
ErrorMessage="Please
enter user id"
style="color: #FF3300">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
Password :
</td>
<td align="left">
<asp:TextBox ID="txtPassword"
runat="server"
Width="200px"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2"
runat="server"
ControlToValidate="txtPassword" ErrorMessage="Please enter password"
style="color: #FF3300">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center"
colspan="2">
<asp:Button ID="btnLogin"
runat="server"
Text="Login"
onclick="btnLogin_Click"
/>
<input id="Reset1"
type="reset"
value="Reset"
/>
</td>
</tr>
<tr>
<td align="center"
colspan="2">
<br />
</td>
</tr>
</table>
|
In this have a look of the below code which we have used for
border.
border: 1px solid black;border-collapse: collapse;
|
Here is the output.
0 comments:
Please let me know your view