Sometimes, we want to stop text from taking up more than 1 line with CSS.
In this article, we’ll look at how to stop text from taking up more than 1 line with CSS.
How to stop text from taking up more than 1 line with CSS?
To stop text from taking up more than 1 line with CSS, we set the white-space
CSS property.
For instance, we write
white-space: nowrap;
to set white-space
to nowrap
to make text stay in one line.
Conclusion
To stop text from taking up more than 1 line with CSS, we set the white-space
CSS property.