0

I've got a very long text (an HTML page actually) (almost an entire book) where there are many thing including some code. These paragraphs are either enclosed by "pre" tags or enclosed by "code" tags. The big problem is that some lines are far too long and when I print them out, they are cut. Moreover the author has put some very long questions in "code" tags (>_<)

Any idea how to force carriage return between those tags? I can add css easily in the header.

Olivier Pons
  • 15,363
  • 26
  • 117
  • 213
  • 1
    Possible duplicate of http://stackoverflow.com/questions/248011/how-do-i-wrap-text-in-a-pre-tag – Maxime Pacary Mar 23 '11 at 09:14
  • You're perfectly right. I'll remove my question, this is a duplicate and the solution proposed there is the right one, it works. Sorry... this is my English which is perfectible so searching wasn't *that* effective ;) – Olivier Pons Mar 23 '11 at 09:21

1 Answers1

2
pre, code
{
    max-width:   100%;
    white-space: normal !important;
}
fuxia
  • 62,923
  • 6
  • 54
  • 62
  • 1
    This doesn't work because it doesn't just "break long lines" (= let other lines like this), it joins all the lines of the "pre" (or "code") paragraph before doing carriage return.... Thanks for the suggestion – Olivier Pons Mar 23 '11 at 09:16