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:
http://giminik.developpez.com/articles/php/style-switcher/

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.

<http://www.w3.org/TR/CSS21/text.html#propdef-white-space>


Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com/>

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to