Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text indent after the first line in a paragraph

- A Reuters reporter in Surkhrod district in Nangarhar province, where villagers said the raids took place, said Afghan police fired at the crowd after some of them started throwing stones at local government buildings.

In the above paragraph, I would like to use CSS to make all lines after the first line to automatically indent some space so that each line stays right after the - in the first line.

HTML

<p> - A Reuters reporter in Surkhrod district in Nangarhar province, where  villagers said the raids took place, said Afghan police fired at the crowd  after some of them started throwing stones at local government buildings.</p> 

It's similar to a list item with list position set to outside, but I don't want to use a list.

What is the simplest way you can think of to achieve this effect? Less extra html markups will be better.

Many thanks to you all.

like image 925
bobo Avatar asked May 14 '10 09:05

bobo


People also ask

Do you indent after the first paragraph?

As remarked above, the first paragraph after a title or section heading is not indented. Every succeeding paragraph should be indented; the tab key on any keyboard will do this for you. For certain kinds of writing, such as technical reports and business letters, there is another format which is sometimes preferred.

What does it mean to indent the first line of a paragraph?

A first-line indent is the most common way to signal the start of a new paragraph. The other common way is with space between paragraphs. First-line indents and space between paragraphs have the same relationship as belts and suspenders. You only need one to get the job done.

How do you indent a paragraph except the first line?

Hanging Indents A hanging indent is an indent that indents all text except for the first line. An example is below: There are a few ways to create hanging indents. On most computers, you can create a hanging indent by selecting the line you want indented and then holding down the Ctrl and T buttons at the same time.

Do you indent the first line after a heading?

If a paragraph is preceded by a title or subhead, the indent is superfluous and can therefore be omitted". (They also mention that Chicago rules state that "the first line of text following a subhead may begin flush left or be indented by the usual paragraph indention.")


2 Answers

You need text-indent. Normally text-indent pushes the first line inwards, but if you give it a minus figure and use a positive margin, you can achieve the effect you're after.

text-indent: -10px; margin-left: 10px 
like image 176
Mathew Avatar answered Sep 20 '22 22:09

Mathew


p {   text-indent: -1em;   padding-left: 1em; } 
like image 23
kennytm Avatar answered Sep 17 '22 22:09

kennytm