Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent line-break in a column of a table cell (not a single cell)?

Tags:

html

css

layout

You can use the CSS style white-space:

white-space: nowrap;

For completion sake:

#table_id td:nth-child(2)  {white-space: nowrap;}

Is used for applying a style to the 2 column of the table_id table.

This is supported by all major Browsers, IE started supporting this from IE9 onwards.


Just add

style="white-space:nowrap;"

Example:

<table class="blueTable" style="white-space:nowrap;">
   <tr>
      <td>My name is good</td>
    </tr>
 </table>

Use the nowrap style:

<td style="white-space:nowrap;">...</td>

It's CSS!