2018.1

Table Of Contents
Alternatively the size and position can be set on the Attributes pane. Note that the size and
offset values will be displayed in the default print units as defined in the preferences.
To move or resize multiple Positioned Boxes at the same time, hold the Ctrl key while selecting
them. You could either select them in the Design view (the main editor) or in the Outline pane.
Dynamically changing the position
A Positioned Box has the following attributes:
l
anchor defines the page number (starting by 0) the box is placed on
l
offset-x defines the horizontal position of the box relative to its container
l
offset-y defines the vertical position of the box relative to its container.
These attributes can be set in a script. The following script dynamically changes the position of
a Positioned Box in a Print context by setting the offset-x and offset-y values.
results.attr('offset-x','96');
results.attr('offset-y','96');
The measurements are in pixels (e.g. 96px = 1in). Note that you do not need to set the units.
Note
Do not set the top or left property of a Positioned Box in a style sheet. The position of a
Positioned Box in a Print context is handled via its attributes to take the page (or Master Page) and
page margins into account. Attributes cannot be overwritten from within a style sheet: style sheets
specify style properties, not values of attributes.
Styling a positioned box
A Positioned Box can be styled using the Format > Box menu item, through the CTRL+M
keyboard shortcut, or through CSS; see "Styling and formatting" on page238 and "Styling
templates with CSS files" on page239.
Inline Box
An Inline Box is one that is placed within the text flow, where other elements (including text)
can wrap around it. An inline box is actually a <div> element that is floating; in other words, it
Page 212