ASP.NET CellPaddingProperty
Table Control
Definition and Usage
The CellPadding property is used to get or set the spacing between the cell border and the cell content (in pixels).
Syntax
<asp:Table CellPadding="px" runat="server">
Some Content
</asp:Table>
Some Content
</asp:Table>
| Property | Description |
|---|---|
| px | Specifies the spacing between the cell border and the cell content (in pixels). |
Example
The following example sets the CellPadding property of the Table control:
<form runat="server">
<asp:Table id="tab1" runat="server"
CellPadding="30">
<asp:TableRow>
<asp:TableCell>
Hello!
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
<asp:Table id="tab1" runat="server"
CellPadding="30">
<asp:TableRow>
<asp:TableCell>
Hello!
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
Try it Yourself »
Table Control Other Extensions