1.4

var json_data = loadjson("snippets/snippet.json");
results.html(json_data.field1);
See also: "Write your own scripts" on page 376.
Styling and formatting
In the Designer you have everything at hand to make your templates look good: colors, fonts
and all the tools to position, align and embellish elements in your designs. This topic informs
about the ways to style a template.
Local formatting versus style sheets
There are in general two ways to style elements:
l
Using local formatting. Local formatting means styling an element directly, using a
toolbar button or one of the formatting dialogs.
l
Using Cascading Style Sheets (CSS). Style sheets can determine the appearance of
individual elements, as well as the appearance of elements that have the same class or
HTML tag.
Whether applied through style sheets or through local formatting, behind the scenes all layout
properties in the Designer are CSS properties. When you format an element locally, an inline
style rule is added to the element.
Note that where local formatting conflicts with a formatting rule for the same element in one of
the style sheets, the local formatting rule gets priority; the rule in the style sheet will be ignored.
It is recommended to use style sheets in your templates right from the start, even more so if your
communications are going to be output to different output channels, or if they consist out of
different sections (for example, a covering letter and a policy). With CSS you can give your
templates one look and feel. A style sheet can change the look of multiple elements, making it
unnecessary to format each and every element in the template, time and again, when the
company's layout preferences change, for example. See "Styling templates with CSS files" on
the next page.
Layout properties
Colors and fonts make an important contribution to the look and feel of your template. See
"Colors" on page 416 and "Fonts" on page 419.
Page 398