Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Styles > Grids > Precedence for cells with more than one style applied
 
Precedence for cells with more than one style applied
You can define any number of different styles for grid cells and the interviewing program will apply them all by adding one style to another. In this way, you can create cells with a pale blue background and a double dark blue border, and that are 1cm high by 1.5cm wide, and that have 5 pixels padding between the borders and the cell contents.
Each cell in a grid has its own set of characteristics that are a combination of the characteristics of an individual row and column. Sometimes the row and column specifications can conflict so that, for example, you have a cell where the row color is set to blue and the column color is set to green. The interview scripting language makes it easy to work out which characteristic the cell will have because it always applies styles in the order they are defined. So, if the row color is set last the cell will be blue; if the column color is set last the cell will be green. The same rules apply to all other characteristics, so it can sometimes be important to specify styles in a particular order to achieve the results you require.
If a script also defines templates and default styles, any individual style settings override the templates and default styles for the items concerned. If the same characteristic is specified in both the metadata and routing sections but with different settings, the specification in the routing section overrides the metadata definition.
See also
Grids