Usage Note 23628: Can I use my existing CSS with ODS?
You can use your existing CSS with ODS. However,
you probably cannot use it right out of the
box, because ODS carries over the PROC TEMPLATE style elements as the
CSS class names, and the class names will not
match those in your CSS.
For example, much of the ODS HTML output
is tagged with <td>. So the td
properties are applied not just to the table cells but also to
the headers, titles, and footnotes, and so on. See the table
in The STYLESHEET Defaults
to learn which
CSS properties are assigned to the
PROC TEMPLATE style elements.
In order to make your CSS classes match the output's
classes, you must
specify the correct
class name as the argument to the HTMLCLASS= option within the appropriate
STYLE statement
of PROC TEMPLATE. Issue similar code for every mismatched
class name in your CSS.
Here is an example: The class TH is probably used in your existing CSS
to format the table headings. But in ODS HTML for Release 8.2, the TH tag
is not used.
Instead, the style element Header from PROC TEMPLATE
is carried over into the default CSS for your ODS output.
Therefore, you must reassign Header to TH by
issuing HTMLCLASS= option as follows:
proc template;
define style styles.test;
parent=styles.default;
style header from header /
htmlclass='TH';
end;
run;
PROC TEMPLATE
can be used in conjunction with an existing CSS.
See Order of Precedence for an explanation of
which style definitions take precedence.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | All | n/a | |
*
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: | Query and Reporting ==> Creating Reports ==> Stylesheets SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2004-01-05 16:37:56 |
| Date Created: | 2003-12-24 13:10:24 |