Sometimes, we want to prevent line break in a column of a table cell with CSS.
In this article, we’ll look at how to prevent line break in a column of a table cell with CSS.
How to prevent line break in a column of a table cell with CSS?
To prevent line break in a column of a table cell with CSS, we set the white-space
property.
For instance, we write
td {
white-space: nowrap;
}
to put all the td’s content into 1 row with white-space: nowrap;
.
Conclusion
To prevent line break in a column of a table cell with CSS, we set the white-space
property.