Jerry Sievers <jerry (AT) jerrysievers (DOT) com> wrote:
Quote:
tried to avoid using PRE in the page markup and instead used DIV
CLASS=foo and assigned the white-space pre property to it. |
Why? If the preformatted form of some text, i.e. the division into lines and
the use of spaces, is essential, why would you rely on CSS instead of
markup? And if it is not, why not let browsers reformat the text as they see
fit? There _are_ in-between cases, but I don't see much point in moving from
PRE to DIV, which _reduces_ the (quasi)semantic information involved.
Quote:
have some reports already that text is not showing as preformatted. |
Well, it surely isn't on any browser with CSS support disabled. The document
http://www.blooberry.com/indexdot/cs...whitespace.htm
says that white-space: pre is supported by IE 5.5+ and Netscape 4+ and
Opera 4+, which means rather widespread support - but not universal (I'm
afraid IE 5.0 is still not dead).
Also note: "Conforming user agents may ignore the 'white-space' property in
author and user style sheets but must specify a value for it in the default
style sheet."
http://www.w3.org/TR/REC-CSS2/text.h...ef-white-space
(The statement is obscure, and the sample style sheet in CSS2 spec does
_not_ specify a value. The statement has been removed in the CSS 2.1 draft.)
You seem to have some TAB (HT) characters there. Although HTML
specifications defines their meaning in PRE context, they also warn about
inconsistent implementations.
In CSS, the situation is even more obscure. The TAB character is defined as
a whitespace character, but its effect on rendering is not defined. (The
CSS 2.1 draft contains an attempt at a definition, which is basically the
same as in HTML.)
To conclude, I would suggest replacing TABs by spaces and using the PRE
markup, instead of CSS.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/