Mozilla.com

  1. MDC
  2. Main Page
  3. DOM
  4. table.cellPadding
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Example
  4. 4. Specification
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Example
  4. 4. Specification

« Gecko DOM Reference

Summary

cellPadding gets/sets the padding around the individual cells of the table.

Syntax

HTMLTableElement.cellPadding = padding;
var padding = HTMLTableElement.cellPadding;
  • padding is either a number of pixels (e.g. "10") or a percentage value (e.g. "10%").

Example

// Set cell padding to 10 pixels
var t = document.getElementById("TableA");
t.cellPadding = "10";

Specification

W3C DOM 2 HTML Specification HTMLTableElement.cellPadding.

Page last modified 05:42, 13 Apr 2006 by RobG?

Files (0)