D
Dominik Jain
Hi!
Browsers resize a table to fit the content - that's generally a good idea.
However, when the text in one cell is so long that it is wrapped, sometimes,
the table does not need to be resized as much as it generally is.
Consider the following example:
<div style="width:100px; font-size:10px;
font-family:Arial,Verdana,sans-serif">
<table border="1" cellspacing="0" cellpadding="0">
<tr><td>some<br>long text</td><td>bar</td></tr>
</table>
<br>
<table border="1" cellspacing="0" cellpadding="0">
<tr><td>some long text</td><td>bar</td></tr>
</table>
</div>
In all the browsers I've tested, the first table was clearly less wide
because the line break is a hard one rather than a soft one.
I wonder, is there a way to modify this behaviour in order to make the
second table appear in the same way as the first one?
cheers!
Browsers resize a table to fit the content - that's generally a good idea.
However, when the text in one cell is so long that it is wrapped, sometimes,
the table does not need to be resized as much as it generally is.
Consider the following example:
<div style="width:100px; font-size:10px;
font-family:Arial,Verdana,sans-serif">
<table border="1" cellspacing="0" cellpadding="0">
<tr><td>some<br>long text</td><td>bar</td></tr>
</table>
<br>
<table border="1" cellspacing="0" cellpadding="0">
<tr><td>some long text</td><td>bar</td></tr>
</table>
</div>
In all the browsers I've tested, the first table was clearly less wide
because the line break is a hard one rather than a soft one.
I wonder, is there a way to modify this behaviour in order to make the
second table appear in the same way as the first one?
cheers!