System.Web.UI.WebControls Namespace Table Class
Sets or retrieves the amount of space between the contents of a table cell and its borders.
Inline |
<asp:table cellpadding = intPixels ... > |
Script |
Table.CellPadding [ = intPixels ] |
intPixels |
Integer specifying the amount of space ( in pixels ) between the border and the contents of a table cell. |
The property is read/write with a default value of -1, which indicates that no value is specified.
Use the CellPadding property to control the spacing between the contents of a table cell and the cell's border. The amount of padding specified is added to all four sides of the cell.
All cells in the same column of a Table control share the same cell width. Therefore, if the content of one cell is longer than the content other cells in the same column, the padding amount is applied to the widest cell. All other cells in the column are also set with this cell width.
Similarly, all cells in the same row share the same height. The padding amount is applied to the height of the tallest cell in the row. All other cells in the row are set with this cell height. Individual cell sizes cannot be specified.
Table Members CellSpacing GridLines