Usage Note 23318: How do I change the table background from the default gray color to another color in ODS HTML output?
The color of an HTML page can be changed in two ways: by changing the value associated with the string bgA or by modifying the style element Body directly.
The examples below change the value of the HTML page from gray to black. The style element Body inherits from the style element Document with the exception of the background color. The method documented in example 1 and example 3 changes the background color of the titles and footnotes to be the same as the body since they use bgA from the color_list style element. Example 3 uses the EDIT statement to create the template instead of the DEFINE statement. The EDIT statement makes a virtual copy of the template with the changes. This is a way to prevent warnings (generated by the REPLACE statement) when you want to specify only the string you want to modify.
View output.
/* Example 1 */
proc template;
define style styles.color1;
parent=styles.default;
Replace color_list /
'fgB2' = cx0066AA
'fgB1' = cx004488
'fgA4' = cxAAFFAA
'bgA4' = cx880000
'bgA3' = cxD3D3D3
'fgA2' = cx0033AA
'bgA2' = cxB0B0B0
'fgA1' = cx000000
'bgA1' = cxF0F0F0
'fgA' = cx002288
/* 'bgA' = cxE0E0E0 */
'bgA' = cx000000;
end;
run;
/* Example 2 */
proc template;
define style styles.color2;
parent=styles.default;
style Body from Document /
background=cx000000;
end;
run;
/* Example 3 */
proc template;
edit styles.default as styles.color3;
style color_list /
'bgA' = cx000000;
end;
run;
See also the full PROC TEMPLATE FAQ and Concepts.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> HTML
|
Date Modified: | 2003-09-22 11:26:29 |
Date Created: | 2003-07-30 16:24:35 |