line-break

Should carriage return \r and new line \n always be used together? \r\n

In JavaScript this was a cross-browser compatibility issue, so both were used, but there are numerous instances in different languages where I see both printed out together as \r\n. Is this still the generally excepted norm that you should just always use both, or is there ever a time where languages understand both and you end up with a...

Can you target <br /> with css?

Hi, wondering if anyone knows if it is possible to target line-break tag with css. Basically all I want to do is have a 1px dashed line every-time there is a line-break. I am customising a site with my own css and cannot change the set html, otherwise I would use some other way. I don't think it is possible but maybe there is a way someo...

HTML/CSS - Paragraphs display line breaks from the source code...

Hello! For some reason my paragraphs are displaying line breaks when there is no <br/> tag being used! So if I type content into the HTML and hit return a few times it gets formatted that way. How can I prevent that? Can I not just get it to flow? ...

I want to use <pre></pre> to keep the format of input text, but the displayed text crosses the boundary of its parental tag<div></div>. How to solve this problem?

The text in <pre></pre> steps beyond the boundary of its parental <div></div>. How to solve this problem? It is said that the line lengths in the preformatted text can be shortened, but how to do it? I have seen <%# DataBinder.Eval(Container.DataItem, "Comments") .ToString().Replace("\n", "<br />") %> Is it c#? I am...

Line Break within echo in a while loop

Quick question, again, I'm sure this is ridiculously simple but I don't see what I'm doing wrong! while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "<a href=\"http://mysite.com/{$row['row1']}/{$row['row2']} \">{$row['row3']} </a>"; } This produces all my links to be stacked up one after the other. I want to order them in...

PHP REGEX - text to array by preg_split at line break

Hi All! EDITED: need help on split Array array example: array ( [0] => :some normal text :some long text here, and so on... sometimes i'm breaking down and... :some normal text :some normal text ) ok, now by using preg_split( '#\n(?!s)#' , $text )...

How to force a line break in a loooooong word in a DIV?

Okay, this is really confusing me. I have some content inside of a div like so: <div style="background-color: green; width: 200px; height: 300px;"> Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest. </div> However, the content overflows the DIV (as expected) because the 'word' is too long. How can I force the ...