Can CSS force a line break after each word in an element?

Use .one-word-per-line { word-spacing: <parent-width>; } .your-classname{ width: min-intrinsic; width: -webkit-min-content; width: -moz-min-content; width: min-content; display: table-caption; display: -ms-grid; -ms-grid-columns: min-content; } where <parent-width> is the width of the parent element (or an arbitrary high value that doesn’t fit into one line). That way you can be sure that there is even a line-break after … Read more

PHP Echo Line Breaks

Use the PHP_EOL constant, which is automatically set to the correct line break for the operating system that the PHP script is running on. Note that this constant is declared since PHP 5.0.2. <?php echo “Line 1” . PHP_EOL . “Line 2”; ?> For backwards compatibility: if (!defined(‘PHP_EOL’)) { switch (strtoupper(substr(PHP_OS, 0, 3))) { // … Read more

How to convert the ^M linebreak to ‘normal’ linebreak in a file opened in vim?

Command :%s/<Ctrl-V><Ctrl-M>/\r/g Where <Ctrl-V><Ctrl-M> means type Ctrl+V then Ctrl+M. Explanation :%s substitute, % = all lines <Ctrl-V><Ctrl-M> ^M characters (the Ctrl-V is a Vim way of writing the Ctrl ^ character and Ctrl-M writes the M after the regular expression, resulting to ^M special character) /\r/ with new line (\r) g And do it globally … Read more

How do I format a String in an email so Outlook will print the line breaks?

I’ve just been fighting with this today. Let’s call the behavior of removing the extra line breaks “continuation.” A little experimenting finds the following behavior: Every message starts with continuation off. Lines less than 40 characters long do not trigger continuation, but if continuation is on, they will have their line breaks removed. Lines 40 … Read more