-1

i want to show second line of wrap text with space .

OUTPUT:

 Lorem Ipsum is simply dummy text of the printing and typesetting 
 industry. Lorem Ipsum has been the industry's standard dummy text 
 ever since the 1500s, when an unknown printer took

EXPECTED OUTPUT:

   Lorem Ipsum is simply dummy text of the printing and typesetting 
     industry. Lorem Ipsum has been the industry's standard dummy text ever 
     since the 1500s, when an unknown printer took

my code:

<style>p{
 overflow:word-wrap;
}</style>
  <p> Lorem Ipsum is simply dummy text of the printing and typesetting 
 industry. Lorem Ipsum has been the industry's standard dummy text 
 ever since the 1500s, when an unknown printer took</p>

Thanks in advance.

Deepu Reghunath
  • 8,132
  • 2
  • 38
  • 47
NanThiyagan
  • 552
  • 6
  • 13

1 Answers1

7

This is pretty easy to handle. The trick is to add a little padding, and then actually "indent" the first line with a negative value. Sort of thinking outside the box.

p {
    padding-left: 2em;
    text-indent:-2em;
}
<p>
 Lorem Ipsum is simply dummy text of the printing and typesetting 
 industry. Lorem Ipsum has been the industry's standard dummy text 
 ever since the 1500s, when an unknown printer took
</p>
skribe
  • 3,595
  • 4
  • 25
  • 36