高さを増やさずに動的に挿入されたテキストが「完全な」長方形になるように、コンテナー (できれば div) を短くすることは可能ですか?
<div style="width:800px;">
<div>I'd like these words to look like below, but I'd like to "automatically" set it with a few lines of CSS rather than with jQuery or some other computationally intensive alternative.</div>
</div>
<br>
<div style="width:800px;">
<div style="width:530px;">I'd like these words to look like below, but I'd like to "automatically" set it with a few lines of CSS rather than with jQuery or some other computationally intensive alternative.</div>
</div>
可能であれば単一の CSS 設定でこれを行いたいのですが、見つかりません。また、多くの div に対してこれを行う必要があり、パフォーマンスを低下させたくないため、これを行うために JavaScript でループを回避したいと考えています。
間違って使用しない限り、空白は役に立たないようです。
よろしくお願いします!
テキスト整列:両端揃え;
それだけでは役に立ちません: http://jsfiddle.net/Q7gcb/4/
max-width + text-align:justify;
どちらも機能しません: http://jsfiddle.net/Q7gcb/5/