I have a <table>
where the last column contains some action <button>
s. The other columns contain paragraphs of text. Because they contain text, their width extends as much as possible and then the text wraps. That is fine for all columns but the last. I don't want the buttons in the actions column to wrap; I want them on a single line. How to can I do that?
See this jsfiddle for a demo the the problem.
It's as simple as this:
.actions {
/* EDIT: float is not necessary in table cells – float: left; */
white-space: nowrap;
}
http://jsfiddle.net/insertusernamehere/XUda2/
The key is to use nowrap
.
<table>
<tr>
<td>Text</td>
<td>Text</td>
<td>Text</td>
<td nowrap="nowrap"><button>Button</button></td>
</tr>
</table>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With