Folding Text in div Box

I’m ajaxing some user-entered text back to a div box, with a border
and background, so it’s clear where the box is. The long lines in the
text go out beyond the right borders of the box, and even off the
screen.

I can write code to fold long lines, in Ruby or Javascript, but I’m
sure this has already been done. You’d think there was a CSS trick
for this but I haven’t come across it yet. I’m all code but weak on
the CSS/presentation side.

So what’s the standard Rails solution for this? I’ve looked in the
prototype and script.aculo.us libraries and haven’t seen anything.
What am I missing?

F

Oops. The ‘

’ was overriding the max-width.  I was using both.

F