This documentation is archived and is not being maintained.

Table.CellPadding Property

Gets or sets the amount of space between the contents of a cell and the cell's border.

[Visual Basic]
Public Overridable Property CellPadding As Integer
[C#]
public virtual int CellPadding {get; set;}
[C++]
public: __property virtual int get_CellPadding();
public: __property virtual void set_CellPadding(int);
[JScript]
public function get CellPadding() : int;
public function set CellPadding(int);

Property Value

The amount of space, in pixels, between the contents of a cell and the cell's border. The default value is -1, which indicates that the property has not been set.

Remarks

Use the CellPadding property to control the spacing between the contents of a cell and the cell's border. The padding amount specified is added to all four sides of the cell.

All cells in the same column of a Table control have the same width. The padding amount is applied to the widest cell and all other cells in the column have this cell width.

Similarly, all cells in the same row havethe same height. The padding amount is applied to the tallest cell in the row and all other cells in the row have this cell height. Individual cell sizes cannot be specified.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Table Class | Table Members | System.Web.UI.WebControls Namespace | CellSpacing

Show: