Doing It In Style:
CSS (Cascading Style Sheets)
Cascading style sheets are part of the standards promoted by the World
Wide Web Consortium (W3C). They have been widely hailed as a return to
the basic HTML separation of structure and presentation, as well as a
method promoting rapid content development. Both these claims are true
and are eminently applicable to online Help.
Cascading style sheets (CSS) define the look of an HTML Help system’s
look and feel—and they do it more quickly and efficiently than would be
otherwise possible. A good cascading style sheet can change the design
of hundreds of HTML pages with the modification of a single line in a
simple text file. This speed and efficiency is particularly important
in online Help systems, where rapid change appears to be the most enduring
fact of professional life.
In addition, CSS gives you control over the appearance of the finished
product which is otherwise difficult to achieve in HTML. In very uncomplicated
terms, cascading style sheets are simple text files that specify the formatting
(font, line spacing, indents, etc.) for each element (such as level 1
headings or list items) on an HTML page.
This chapter discusses cascading style sheets: what they are, how to
use them, and how to create them. Since CSS, like any computer-based standard,
has many different implementations, this chapter focuses on how CSS standards
apply to HTML Help and, even more specifically, to compiled HTML Help.
In general, this means following Microsoft’s implementation of CSS in
Internet Explorer versions 4 and above. Fortunately, Microsoft and the
major browsers seem to be moving towards ever greater adherence to the
W3C recommendations, so that Help writers will find it ever easier to
create a single cascading style sheet applicable to most user situations.