html - Width of a <td> is narrower when I use a <br> in it on a fixed width <table>. Why? -
i have html code fragment (in valid document using strict doctype):
<p>without <br /></p> <table border="1" width="220"> <tbody>     <tr>         <td>lorem</td>         <td>ipsum</td>         <td>lorem ipsum</td>         <td>lorem</td>         <td>ipsum</td>     </tr> </tbody> </table>  <p>with <br /></p> <table border="1" width="220"> <tbody>     <tr>         <td>lorem</td>         <td>ipsum</td>         <td>lorem<br>ipsum</td>         <td>lorem</td>         <td>ipsum</td>     </tr> </tbody> </table>   this rendered in browser:

please note third <td> wider in first table, because haven't used <br> tag there. otherwise code 2 tables identical.
i find way have table rendered on second example, without having use <br> tag.
clarification
i can't specify widths of cells because may contain number of characters.
seems ages old problem / question - unfortunately have no solution offer link 2005 proves struggling then. :)
http://www.velocityreviews.com/forums/t162343-how-to-prevent-unnecessary-table-resizing.html
Comments
Post a Comment