Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text won't wrap/break withing div or paragraph

Tags:

html

css

I'm having a noob issue. I have a long string of text (with spaces) within a <p> tag.

The string just goes on forever, and won't wrap or break at the end. Here's what I have going on:

http://jsfiddle.net/lordzardeck/RmFkk/

like image 518
LordZardeck Avatar asked May 07 '12 02:05

LordZardeck


People also ask

How do I force wrap text in a div?

If you've faced the situation when you need to wrap words in a <div>, you can use the white-space property with the "pre-wrap" value to preserve whitespace by the browser and wrap the text when necessary and on line breaks. Also, you'll need the word-wrap property.

Why is Excel not wrapping text?

Note: If all wrapped text is not visible, it might be because the row is set to a specific height. To enable the row to adjust automatically and show all wrapped text, on the Format menu, point to Row, and then click AutoFit.

How do you force text wrap in CSS?

Today I'm going to talk about a rarely used but extremely useful CSS property, the word-wrap. You can force long (unbroken) text to wrap in a new line by specifying break-word with the word-wrap property.

How do I fix text wrapping?

Enable or disable text wrapping for a text box, rich text box, or expression box. Right-click the control for which you want to enable or disable text wrapping, and then click Control Properties on the shortcut menu. Click the Display tab. Select or clear the Wrap text check box.


1 Answers

you're being affected by the style at ext-all.css (line:21)

.x-grid-cell-inner { white-space: nowrap; }

You'll probably want to do something like:

.chat-message p { white-space:normal; }
like image 190
ltiong_sh Avatar answered Sep 28 '22 02:09

ltiong_sh