Can I adjust the width of a <pre> area to fit the text?
The best solution so far :
pre {
white-space: pre-wrap;
}
You can use display: inline-block;
:
http://jsfiddle.net/hLVV9/1/
Although please check out the browser support, because it wouldn't surprise me if IE doesn't support it.