Sometimes, we want to remove word wrap from textarea with CSS.
In this article, we’ll look at how to remove word wrap from textarea with CSS.
How to remove word wrap from textarea with CSS?
To remove word wrap from textarea with CSS, we set the white-space
and overflow
properties.
For instance, we write
textarea {
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
}
to remove word wrap with overflow-wrap: normal;
.
We add overflow-x: scroll;
so we can see all the text in the text area.
Conclusion
To remove word wrap from textarea with CSS, we set the white-space
and overflow
properties.