Home ~ ToC ~ Index ~ Refs ~ Feedback Known CSS Implementation Bugs
Last Modified: 31 December 1997

CSS Problems related to Printing

Platforms Demonstrating Problem

Various Platforms (See Below)

Description of Problem

Certain CSS rules can cause problems when printing Web pages, even though the browser-displayed document can be quite acceptable. Thus, care must be taken when preparing pages that your user's will want to print. The following are the most common problems.

Font Size Adjustments
In some cases, browser's will not properly print text content when the font-size is adjusted using font or font-size: The font size is incorrectly reduced to some miniscule length, and the text appears in an unreadably small size.
Generic Workaround -- Test your pages, on all browsers, for printability. In some cases, you may need to replace CSS-specified font size adjustements by a ... HTML element-based markup.

Element Borders (Netscape Navigator 4)
With Netscape navigator 4, placing a border fully around an element will result in incorrect printing of the element content. For some reason, Netsacpe Navigator 4 does not properly set the right margin for "boxed" elements, so that the text does not wrap to the page, but instead prints outside the right margin of the page.
Workaround -- Do not place borders completely around elements. The element content will be correctly rendered if the border is only placed on the left hand side of the element (like a sidebar). It may also print correctly if the top and/or bottom sides are bordered.

Margin and Padding Spaces
Margins and padding space sizes are improperly calculated when page is printed -- in general, margins and padding spaces are much smaler than those seen on the display. As a result, element positionings are incorrectly reproduced.
Workaround -- Do not use margin and padding-specified positioning to define important content for a document that is likely to be printed.

Prepared by: Ian Graham Known CSS Implementation Bugs
Last Modified: 31 December 1997