ASP.NET CellSpacing property

Definition and usage

The CellSpacing property is used to set or return the spacing between cells in the table (in pixels).

Note:This property is invalid in FireFox.

Syntax

<asp:Table CellSpacing="px" runat="server">
Some Content
</asp:Table>
Property Description
px Specify the spacing between cells (in pixels).

Example

The following example sets the CellSpacing property of the Table control:

<form runat="server">
<asp:Table id="tab1" runat="server" CellSpacing="30">
<asp:TableRow>
<asp:TableCell>
Hello!
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>

Example

Set the CellSpacing property for Table control