20.4.2.10 positionH

This element specifies the horizontal positioning of a floating DrawingML object within a WordprocessingML document. This positioning is specified in two parts:

  • Positioning Base - The relativeFrom attribute on this element specifies the part of the document from
  • which the positioning shall be calculated.
  • Positioning - The child element of this element (align or posOffset) specifies how the object is
  • positioned relative to that base.

[Example: Consider a DrawingML picture which must be displayed in the center of the printed page on which it appears, modifying the flow of text as necessary. This object would be specified as follows:

<wp:anchor  >
  <wp:positionH relativeFrom="margin">
    <wp:align>center</wp:align>
  </wp:positionH>
  <wp:positionV relativeFrom="margin">
    <wp:align>center</wp:align>
  </wp:positionV>
</wp:anchor>

The positionH element specifies that the object is horizontally positioned relative to the margin via the relativeFrom attribute; and that the alignment relative to the margin is centered via the align element. end example]

Attributes

relativeFrom (Horizontal Position Relative Base)

Specifies the base to which the relative horizontal positioning of this object shall be calculated.

[Example: Consider a DrawingML picture which must be displayed at the bottom center of the page. This object would be specified as follows:

    <wp:anchor  >
        <wp:positionH relativeFrom="page">
          <wp:align>center</wp:align>
        </wp:positionH>
    </wp:anchor>

The relativeFrom attribute specifies that the object is horizontally positioned relative to the page. end example]

The possible values for this attribute are defined by the ST_RelFromH simple type (20.4.3.4).

[Note: The W3C XML Schema definition of this element’s content model (CT_PosH) is located in A.4.4. end note]

Last updated on