How to make a td (cell) from an html table expand so that the row matches one row?

In some html cells (td), the text is wrapped because the column size is smaller than the text size in the cell. I do not want the text to be wrapped, I want the width of the column to expand, so the wrapper does not happen!

How can i do this?

Finally, I can only use html code, not css :(

+5
source share
2 answers

Since you cannot use CSS, how about:

<td nowrap="nowrap">

I would prefer to use CSS here in TD (white-space: nowrap), since the nowrap attribute in the TD element is not supported by HTML 4.01 Strict / XHTML 1.0 Strict.

jsFiddle, . , .

+9

, , colspan = "x".

<table>
   <tr>
      <td>1</td>
      <td>2</td>
   </tr>
   <tr>
      <td colspan="2">fills both columns</td>
   </tr>
</table>
+10

All Articles