I have a HTML table, wich one of the columns will contain a long line of text. But some pieces of this text need to have different font colors, so i divide this text into a series of span elements, so i can format each one accordingly. The problem is that i can make the text wrap inside this cell, its expanding the TD size to fit the elements.
I don't need the text inside each span to break, but when the elements reach the end of the TD element, i want the next span to be arranged in the next line.
Does anyone there know how can i do that?
A example to illustrate:
Source:
<table>
<tr>
<td>
<span>Sample Text A</span>
<span>Sample Text B</span>
<span>Sample Text C</span>
<span>Sample Text D</span>
<span>Sample Text E</span>
<span>Sample Text F</span>
</td>
</tr>
</table>
This is the desired output:
This is the limit of the TD element =============>|
Sample Text A Sample Text B Sample Text C
Sample Text D Sample Text E Sample Text F
This is the result i'm getting:
This is the limit of the TD element =============>|
Sample Text A Sample Text B Sample Text C Sample Text D Sample Text E Sample Text F