Forum Moderators: not2easy

Message Too Old, No Replies

Hanging indent

Code for paragraph with hanging indent

         

Adam5000

1:43 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



I'm writing text on one of my web pages and I'd like to have one of the paragraphs to have a hanging indent.

In a paragraph with a regular indent, the first line of a paragraph is indented, for example 1 inch, and the rest of the lines are flush with the left margin.

Paragraph with a regular indent
<p style="text-indent: 1in;">
Text here.
</p>

But a paragraph with a hanging indent is just the opposite. In a paragraph with a hanging indent, the first line is flush with the left margin, and the rest of the lines are indented, for example 1 inch.

Is there any code to specify a hanging indent?

Help!

ChadSEO

2:42 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



Adam5000,

The following would give you a 1 inch hanging indent:

<p style="padding-left:1in; text-indent: -1in;">

I tested this in Firefox and IE6, so I'm not sure if it's universally supported but it worked on those.

Chad

Adam5000

6:46 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



That's teriffic.
That worked just fine and makes the page look a lot better.