Recently for a Remote XUL/Ruby On Rails project I had to figure out a way to have a block of text word wrap correctly while keeping the width of the text rather small since it would be displayed in a sidebar. Of course I instantly turned to the <description> tag in XUL, which at first glance this seemed to provide all the functionality I needed. After working with the description tag for a while, I started running into some limitations in how the tag was being displayed. For an excellent background on some of the limitations in using the "description" tag, please check out the the blog post at XUL Description revisited. Ryan's blog post is an excellent start but leaves out one major flaw in using CSS to force the <description> tag to respect white space correctly. When using this technique the description element no longer respects the bounds of it's parent element.
Using the "white-space: pre;" method, the screen shot shows that the description element does represent the text correctly, but also goes outside the bounds of it's parent element.
Conclusion:
After numerous attempts with different CSS and XUL options, I gave up and realized that there was no good way to accomplish my task. Hopefully this is something that will be addressed in FireFox 3.0 when they move to the new gecko engine. Also I did see some hope in the specs for CSS 3.0 that would allow text wrapping to be handled in a purely CSS way, but at this time your options are very limited.
Work Around:
In order to accomplish my task I resulted to splitting up the text by line breaks and making separate description tags for each line. This will allow the text to wrap within the small space, but also allow me to preserve the line breaks of the text.
The code for this example can be found here: Download example.xul