Previous Message
Next Message

a problem with the impression of the tag pre

Sent by Philippe Wittenbergh on 23 June 2005 08:08

On 23 Jun 2005, at 3:48 pm, Matthieu Petiot wrote:

> hello!
> I'm French, then excuse me for my bad English accent :-).
> i use a tag pre to post code on my website.
> here styles used for this tag:
> [....]
> but when I print the page, part of the contents of the tag pre is 
> truncated
> because lines are very long.
> I tried well to use the property white-space:normal but the result is 
> ugly.
> there is no more line feed.
> does somebody have a solution?
> you can look at the result on this page for example:

For your print stylesheet
pre {
	word-wrap: break-word;
	white-space: pre-wrap; /* iCab 3.0 beta,  nobody else ?? */
	white-space: -moz-pre-wrap; /* Gecko */
	white-space: -khtml-pre-wrap; /* Safari, not working --  maybe on 
Konqueror khtml */
	white-space: -o-pre-wrap; /* Opera */

This works fine in Opera and Gecko (with the vendor prefix).
Safari doesn't listen, unfortunately. I'm not sure about IE win.


Philippe Wittenbergh

css-discuss [EMAIL-REMOVED]]
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: