Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities
Page layout facilities
Page layout facilities control everything about the appearance of the questionnaire during an interview, from the background color of each page to the position of question and response texts on a page, and the fonts and font effects used for those texts. You can break page layout facilities into three categories:
These define the characteristics of an individual item, such as the color of a question’s text or the image to be displayed for a particular response. You define styles in the metadata or routing sections of the script. For more information, see Styles.
Default styles
These define the default characteristics for the different types of page elements such as question texts, response texts, and navigation buttons. You define default styles in the routing section of the script. For more information, see Default styles.
Template files define the overall appearance of a page and tend to apply either to whole questionnaires or to sections of a questionnaire. They control aspects such as the position of question and response texts and error messages, and can use cascading stylesheets to determine colors, fonts, and so on. UNICOM Intelligence Development Library comes with a number of example templates that you can use or you can define your own templates from scratch. For more information, see Templates.
Order in which styles are applied
When a questionnaire uses two or more of these layout facilities, the styles are applied in the following order:
1 Template
CSS Styles
HTML CSS Styling as attributes within tags
2 Defaults
DefaultStyles.Navigation and DefaultStyles.Categories
3 Styles in the metadata section
4 Styles in the routing section
5 Grid styles
A style defined for an individual item in the routing section overrides the corresponding style in the metadata section and also the default style or template setting for that item only. For example, if the template specifies that all question texts should be red, you can display an individual question text in green simply by setting this as part of the question’s definition in the metadata or routing section.
If you are not familiar with the Interview Object Model or with object oriented programming in general, see Interview Object Model overview before reading anything to do with setting styles in the routing section of the interview script.
In addition, the behavior of many of the styles and default styles is based on the way that similar facilities work in standard HTML browsers.
See also
Writing interview scripts