tags:

views:

26

answers:

1

There is two Div in, which div have store some information. And two Div is side by side. I want to let the description automatic go to next line, if the string is too long. How can I do so? Here is the code:

<div class="round">  
    <div style="float:left;width:50%">
        <ul class = "round"> 
         <li> Description: DFGHJKXCFGVHBJNESDRTYHUICFVGBHJNKMCFGVBHJN</li>    
        </ul>
    </div>      
    <div style="float:right;width:50%">
        <ul class = "round"> 
         <li> Description: ERTYUIOPOIUFKJHGFLKGKFGHCFGVBHJNKVBJNK</li>    
        </ul> 
    </div>      
</div>    
+3  A: 

This does the trick:

.round {
    word-wrap: break-word;
}
BoltClock
Yes, it's supported in FF 3.5+, Safari/Chrome, and IE5.5+. Here's a test - http://www.brunildo.org/test/IEbreak-word.html
washwithcare