I have the following structure:
<ul>
<li>
<p style="width:10px;">
Text goes here
</p>
</li>
<li>
<p style="width:10px;">
Text goes here
</p>
</li>
</ul>
When the text of the p exceeds the 10px limit I would like it to continue in a new row.. How do i do that? Thanks
Your example already word-wraps (because
<p>is already a block element), if you want to break words, then you could try:Here’s a basic working example: http://jsfiddle.net/G9z5M/ (see updates below).
You can play around with it using various techniques:
See updated fiddle: http://jsfiddle.net/G9z5M/1/