FAQ About Using External Cascading Style Sheets

This topic answers the most frequently asked questions (FAQ) about using external cascading style sheets (CSS) to format reports.

Does it answer your question? We invite you to send us any questions that you would like answered. Each question will get a response, and will also be considered for inclusion in a future release of FAQ. (We also invite your comments on anything in this document.)

You can:

How do I specify a report default formatting using CSS?

You can specify default formatting for an entire report in an external cascading style sheet rule for the BODY or TD element. For more information, see Choosing an External Cascading Style Sheet.

Do I always need to use the CLASS attribute?

No. You need the CLASS attribute in a WebFOCUS StyleSheet if you specify formatting for an individual report component. (You use CLASS to assign a rule for a generic class to the report component.) When you specify formatting for the entire report, you do so in a rule for the BODY or TD element, not a rule for a class, so you omit the CLASS attribute.

If you place a reference to a CSS class in your StyleSheet, it will be applied to the <A> tag as well as the <TD> tag. For example, if you have the class ".class1" in your external CSS, WebFOCUS would generate the following HTML for a value with a drilldown:

<TD CLASS='class1'>
<A class='class1' HREF="...">ENGLAND</A>

For example, if you want red hyperlinks without underlines, issue:

SET CSSURL=http://myserver/mycss.css
type=data, column=country, focexec=fex1, class=class1, $

where mycss.css contains:

.class1 { color:red; text-decoration:none }

The output is:

For more information, see Applying External Cascading Style Sheet Formatting.

Can I use a cascading style sheet and a WebFOCUS StyleSheet together?

When you link to an external cascading style sheet, you can also specify native WebFOCUS StyleSheet attributes in a WebFOCUS StyleSheet. However, if you do not generate an internal cascading style sheet, you should not specify CSS classes (CLASS=) and native WebFOCUS StyleSheet attributes in the same WebFOCUS StyleSheet (except to specify a condition for conditional formatting, to specify a link to another resource, and to embed an image). For more information, see Combining an External CSS With Other Formatting Methods. For information about internal cascading style sheets, see Generating an Internal Cascading Style Sheet for HTML Reports.

Which version of CSS does WebFOCUS support?

Support for different versions of cascading style sheets (such as CSS2) is determined entirely by your web browser support and implementation of cascading style sheets, not by WebFOCUS. Note that some web browsers may not fully support the latest CSS version, or may implement a CSS feature in different ways. For more information, see Requirements for Using an External Cascading Style Sheet, and Troubleshooting External Cascading Style Sheets.

Can I use CSS to format reports generated as PDF, PostScript, or Excel 2000?

No, you can only use external cascading style sheets to format reports that are generated as HTML.

Which types of reports can I format using an external cascading style sheet?

You can format all types of reports using an external CSS: