In text display, line wrap is the feature of continuing on a new line when a line is full, such that each line fits in the viewable window, allowing text to be read from top to bottom without any horizontal scrolling.
Questions tagged [word-wrap]
2780 questions
984
votes
35 answers
Auto Scale TextView Text to Fit within Bounds
I'm looking for an optimal way to resize wrapping text in a TextView so that it will fit within its getHeight and getWidth bounds. I'm not simply looking for a way to wrap the text- I want to make sure it both wraps and is small enough to fit…

Nathan Fig
- 14,970
- 9
- 43
- 57
625
votes
9 answers
How to wrap text in LaTeX tables?
I am creating a report using LaTeX, however, the cell data in the table is exceeding the width of the page.
How can I wrap the text so that it falls into the next line within the same cell of the table?
Is the solution somehow related to specifying…

Arnkrishn
- 29,828
- 40
- 114
- 128
615
votes
6 answers
How to turn off word wrapping in HTML?
I feel silly for not being able to figure this out, but how do I turn off wordwrap? the css word-wrap property can be forced on with break-word, but cannot be forced off (only can be left alone with normal value).
How do I force word wrap off?

Alexander Bird
- 38,679
- 42
- 124
- 159
596
votes
7 answers
How to prevent line breaks in list items using CSS
I'm trying to put a link called Submit resume in a menu using a li tag. Because of the whitespace between the two words it wraps to two lines. How to prevent this wrapping with CSS?

Rajasekar
- 18,392
- 34
- 106
- 137
434
votes
13 answers
What is the difference between "word-break: break-all" versus "word-wrap: break-word" in CSS?
What is the difference between "word-break: break-all" and "word-wrap: break-word"?
When I used both, they seemed to break the word if it was not fitting the container. But why did W3C make two ways to do it?

Nap
- 8,096
- 13
- 74
- 117
427
votes
6 answers
How to stop text from taking up more than 1 line?
Is there a word-wrap or any other attribute that stops text from wrapping? I have a height, and overflow:hidden, and the text still breaks.
Needs to work in all browsers, before CSS3.
Franky
384
votes
12 answers
How can I toggle word wrap in Visual Studio?
Does Visual Studio .NET have a way to toggle word-wrap on and off?
I am used to this feature in Eclipse which allows you to right click and toggle word wrap on and off so that when you have long lines that extend out to the right, you don't have to…

Edward Tanguay
- 189,012
- 314
- 712
- 1,047
294
votes
10 answers
How can I wrap text in a label using WPF?
I have a TextBox and a Label. After clicking a button, I execute the following code:
label1.Content = textbox1.Text;
My question is, how do I enable text wrapping of the label? There may be too much text to display on one line, and I want it to…

jeremychan
- 4,309
- 10
- 42
- 56
287
votes
6 answers
vim command to restructure/force text to 80 columns
I know there are ways to automatically set the width of text in vim using set textwidth (like Vim 80 column layout concerns). What I am looking for is something similar to = (the indent line command) but to wrap to 80. The use case is sometimes you…

wickedchicken
- 4,553
- 5
- 22
- 28
255
votes
15 answers
How should I use git diff for long lines?
I'm running git-diff on a file, but the change is at the end of a long line.
If I use cursor keys to move right, it loses colour-coding—and worse the lines don't line up—making it harder to track the change.
Is there a way to prevent that problem or…

Peter Boughton
- 110,170
- 32
- 120
- 176
247
votes
9 answers
How to wrap text of HTML button with fixed width?
I just noticed that if you give an HTML button a fixed width, the text inside the button is never wrapped. I've tried it with word-wrap, but that cuts of the word even though there are spaces available to wrap on.
How can I make the text of an HTML…

Peter
- 14,221
- 15
- 70
- 110
234
votes
16 answers
How can I force a long string without any blank to be wrapped?
I have a long string (a DNA sequence). It does not contain any whitespace character.
For example:
ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTCGATGTAGCTAGTAGCATGTAGTGA
What would be the CSS selector to force this text…

Pierre
- 34,472
- 31
- 113
- 192
215
votes
13 answers
How to make a DIV not wrap?
I need to create a container DIV style that contains multiple other DIV's. It is asked that these DIV's wouldn't wrap if the browser window is resized to be narrow.
I tried to make it work like below.