w:tblCellMar (Table Cell Margins)
Sets default top, bottom, left, and right cell margins for all cells in the table.
Parent elements
Description
w:tblCellMar specifies the default interior margins for all cells in the table. It is defined in ECMA-376 Part 1 §17.4.43.
Each child element (w:top, w:left, w:bottom, w:right) defines the gap between the cell border and the cell content on that side. Individual cells can override these defaults with w:tcMar.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
| (none) | — | — | Margins are specified via child elements w:top, w:left, w:bottom, w:right. |
Each child supports:
| Child attribute | Type | Possible Values | Description |
|---|---|---|---|
w:w |
ST_TwipsMeasure |
Non-negative integer in twips. | Margin width. |
w:type |
ST_TblWidth |
dxa (twips) or nil |
Unit; almost always dxa. |
Examples
<w:tblCellMar>
<w:top w:w="115" w:type="dxa"/>
<w:left w:w="115" w:type="dxa"/>
<w:bottom w:w="115" w:type="dxa"/>
<w:right w:w="115" w:type="dxa"/>
</w:tblCellMar>
var m = (TableWidthUnitValues t = TableWidthUnitValues.Dxa) => new { Width = "115", Type = t };
new TableCellMarginDefault(
new TopMargin { Width = "115", Type = TableWidthUnitValues.Dxa },
new LeftMargin { Width = "115", Type = TableWidthUnitValues.Dxa },
new BottomMargin { Width = "115", Type = TableWidthUnitValues.Dxa },
new RightMargin { Width = "115", Type = TableWidthUnitValues.Dxa });