ClickStart logo CSS to the point

Creating a hanging indent

You can use the padding-left property to indent a block of content and the text-indent property to indent the first line. If you set the text-indent property to the negative value of the padding-left property, the first line of content will not be indented, but the additional lines will be indented using the padding-left property’s value.

Screenshot

Code

CSS

p.hangingIndent {
text-indent: -28px;
padding-left: 28px;
}

Usage

<p class="hangingIndent">text…text</p>

Example

Click here to see an example.