How to insert a first line indent with css?

4

I do not know if the name is indentation, but how do I apply this space as in the image below in my paragraphs with css? Are there any class in the bootstrap?

    
asked by anonymous 09.05.2016 / 20:24

2 answers

9

In pure CSS, just use text-indent :

.recuo { text-indent:4em }
<p class="text-info recuo">
  Suspendisse nec tincidunt nulla. Aliquam et urna magna.
  Suspendisse et tortor libero. Mauris risus tellus, auctor eu
  placerat at, auctor a lacus. Nunc porta urna vel luctus porta.
  Pellentesque vulputate tortor velit, non sodales sapien dictum at.
  Mauris cursus, neque vel egestas posuere, felis ligula mollis
  leo, id scelerisque neque dui sed elit. Maecenas in purus sed
  massa semper elementum. Nunc id bibendum dolor, imperdiet blandit
  urna. Vestibulum ultrices sem nisl, et tincidunt tortor imperdiet
  eget. Maecenas faucibus nisl nec mi aliquam pellentesque eget et ex.
  In ut turpis eget dui maximus volutpat id a arcu.
</p>

Although Bootstrap does not have a specific class for indentation, you can use a default Bootstrap class and add your own, within the same class current, as in the example above.

In the example I put the text-info , (which in our example does nothing), and then the recuo of its own CSS, to demonstrate text-indent .     

09.05.2016 / 20:33
3

Use the text-indent: 40px property.

    
09.05.2016 / 20:33