1.6

Table Of Contents
it easier to target them in a script or a style sheet. Place the cursor in the element or select
multiple elements. Then, on the menu, click Insert > Wrap in Box. You can now use the
wrapper element as a script's or style's selector; see "Using the Text Script Wizard" on
page212 and "Styling and formatting" on page168.
Positioned Box
A Positioned Box is one that can be freely moved around the page and does not depend on the
position of other elements. A positioned box is actually a <div> element that has an absolute
position; in other words, it has its CSS property position set to absolute.
Positioned Boxes are suitable for use in Print templates only.
Adding a Positioned Box
To insert a Positioned Box, use the icon on the toolbar.
Moving and resizing a Positioned Box
Positioned Boxes can be moved by dragging the borders, and resized using the handles on the
sides and the corners. 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.
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.
Page 148