1.6

Table Of Contents
The Designer Scripts API provides several functions to style elements, for example css(),
hasClass() and addClass() (see "Designer Scripts API" on page427).
Background color and/or image
In any type of template, boxes, tables and table cells can have a background color and/or a
background image.
To select a background image or color:
1.
Right-click the box and click Box on the shortcut menu.
2. Alternatively, select the box (see "Selecting an element" on page105; note that a Box is a
<div> element) and on the Format menu click Box.
3.
Click the Background tab.
To select a background color: click the downward pointing arrow next to Color to select a
color from the list of predefined colors (see "Defining colors, spot colors and tints" on
page192), or click the colored rectangle to open the Color Picker dialog; see "Color Picker" on
page260. In this dialog you can select a color from the color wheel or using the eye dropper
tool, set RGB or CMYK color values or enter a hexadecimal color code.
To select a background image:
1.
Click the Select Image button.
2.
Click Resources, Disk or Url, depending on where the image is located.
l
Resources lists the images that are present in the Images folder on the Resources
pane.
l
Disk lists image files that reside in a folder on a hard drive that is accessible from
your computer. Click the Browse button to select a folder (or an image in a folder).
As an alternative it is possible to enter the path manually. The complete syntax
is:file://<host>/<path>. Note: if the host is"localhost", it can be omitted, resulting
infile:///<path>, for example: file:///c:/resources/images/image.jpg.
l
Url lists image files from a specific web address. Select the protocol (http or https),
and then enter a web address (for example,
http://www.mysite.com/images/image.jpg).
Page 188