Reputation:
I have a table that is too big for my page. What I wanted was to get scroll bars but what happens is the words in a <td>
wrap around onto the next line. Is there a way I can stop the words wrapping so that the table gets big and the scroll bars appear?
Note I already enclosed my table in a overflow-x: auto
div.
Upvotes: 2
Views: 95
Reputation: 375
To do it with css you would use:
white-space: nowrap;
This forces it to stay on one line.
Ex: http://jsbin.com/EsenUCI/1/edit?html,css,output
Upvotes: 0
Reputation: 133
You could add the nowrap flag to your td tag. There is probably a css version (which would be a more modern way to do it)
eg:
<td nowrap>text text text</td>
Upvotes: 2