Introduces the concept of 'media' and how to direct browsers to use different style sheets for different media.

  • Introduction
  • Printer style sheets
  • Media types

Suggests what should be considered when writing style sheets for print media i.e. how these differ from what other media require.

  • Dimensions
  • Selections
  • Page Media

Putting it all together and avoiding some pitfalls. Making it easy as well.

  • The right order
  • Inline styles
  • Browsers
  • Development aid

Links to some resources


This page was composed using KompoZer

KompoZer User Guide - Appendix 7

Appendix 7 - Making pages Printable

A7.1 Preliminary

A7.1.1 Introduction

When web pages are printed the results are sometimes unsatisfactory. Using CSS, authors can often improve this significantly though browser support for some print rules is still somewhat limited.

Although web pages are most commonly viewed on screen site visitors sometimes wish to print them to hard copy. This is particularly so with pages carrying information about an order or order confirmation, though it could occur for almost any page.

One approach is to offer a special 'printer friendly' version of a page. This is accessed via a link on the page and can be formatted to produce a good printed result. One penalty is that two versions of a page must be maintained with concomitant risk that the content of the two may differ; another is that the visitor may miss the link and use the normal method of printing so the effort is wasted.

Fortunately CSS styles provide an alternative approach. A special printer style sheet can be developed; all pages on a site can be linked to it and no special editing of individual pages is required. A page may then be printed using menu instructions such as File > Print in a browser.

Those unfamiliar with CSS should return to Section 4 of the User Guide and learn how to use Styles in KompoZer before proceeding further.

A7.1.2 Printer style sheets

Printer stylesheets can be either internal or external (linked) sheets. What is needed is some means of identifying such sheets with the purpose for which they are intended. This is done using one of two methods.

A7.1.2.1 Style sheets – media="print"

The normal form of a link to an external style sheet, in the header of a file, is .

The normal form for the opening tag for an internal style sheet is