0

I have got a text like this:

<p>One day I went to the park and then ate the apple.</p>

And then browser (due to contain width etc) renders it like this:

One day I went to the park 

and then ate the apple.

Then, with which [escape] character, should I get the broken line? If the line was broken with a
, then it was easy, but now it is not using any HTML tag to do so.

Mostafa Talebi
  • 8,825
  • 16
  • 61
  • 105
  • _There is no `[escape]` character_ - the browser just wraps the line. Do you perhaps want to just determine the point at which the text wrapped? If so, there are likely numerous answers to that question here already, e.g. http://stackoverflow.com/questions/4671713/detecting-line-breaks-with-jquery – Alnitak Jul 27 '14 at 11:04
  • @Alnitak, yes I just one the point the line breaks. – Mostafa Talebi Jul 27 '14 at 11:12
  • breaks the line , browser wraps the line. That's it. Saying that , adjust the font size on different viewports to get same layout. – Abhinav Gauniyal Jul 27 '14 at 11:20

1 Answers1

0
<p>One day I went to the park and&nbsp;then&nbsp;ate&nbsp;the&nbsp;apple.</p>

The "& n b s p ;", (Non-line Breakable SPace) when used to make a space creates that behavior.

Wayne
  • 4,760
  • 1
  • 24
  • 24