2018.1

Table Of Contents
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 page614 and "Styling
templates with CSS files" on page616.
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
has its CSS property float set to left, right or no float.
Inline Boxes can be used in Print context and in Web pages. It is common to do entire web
layouts using the float property. In Email templates, it is best to use Tables to position
elements.
Page 572