Wordprocessing Tables
Margins for a single table cell are specified with the <w:tcMar> element within the <tcPr> element. This overrides the table-level cell margins, if present.
Default table cell margins are set to zero. The B cell below is set as specified above:
Elements:
Element | Description |
---|---|
top | Specifies the amount of space between the top of the cell contents and the top border.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.78.
|
bottom | Specifies the amount of space displayed between the bottom of the cell content and the bottom border.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.2.
|
start | Specifies the amount of space between the left end of the cell contents and left border for left-to-right tables (between the right end and right border for right-to-left tables).
Note: In the previous version of the standard, this element was left. Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.36.
|
end | Specifies the amount of space between the right end of the cell contents and right border for left-to-right tables (between the left end and left border for right-to-left tables).
Note: In the previous version of the standard, this element was right. Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.10. |
Attributes:
The attributes for the above table cell margin elements are:
Attribute | Description |
---|---|
w | Specifies the value of the width of the margin. If omitted, the value is assumed to be 0; |
type | Specifies the units of the width (w) property.
Possible values are:
If the attribute is omitted, its value is assumed to be dxa. |
Related Open Document Format (ODF) Property:
Margins within a cell can be set by adding the fo:margin, fo:margin-bottom, fo:margin-left, fo:margin-right, and fo:margin-top attributes to the <style:paragraph-properties> element for the style applied to the paragraph that contains the text within the cell. Values are either a number or a percent. So margins are not set in the <style:table-cell-properties> element, but on the style for the paragraph within the cell.
Related HTML/CSS Property:
padding-bottom:0px;
padding-top:25px;
padding-left:15px;
padding-right:10px;
}
AAA | BBB | CCC |
DDD | EEE | FFF |
GGG | HHH | III |