[WEB4LIB] hanging indents?

Thomas Dowling tdowling at ohiolink.edu
Fri Mar 16 12:10:54 EST 2001


> Is there any way to create a hanging indent on a web page?  We're
creating a
> page on citing in MLA style, and while I'm fairly sure this can't be
done, I
> thought I'd ask the experts.
>

I seem to have gotten two or three days' worth of Web4Lib dropped into my
account in one fell swoop.  Interesting experience: I got most of the
answers to this question before seeing the question.

With respect, the only partially correct response was Christine
Peterson's: "p {text-indent: -30px; margin-left: 30px; }".  This is the
only solution I saw that actually makes a paragraph with a hanging indent;
that is:

  1.  An actual paragraph, marked up with <p>.
  2.  A left margin on the first line that lines up with the parent block.
  3.  A left margin for all subsequent lines that is indented.

Full marks would be given for using a relative size for the indent: "p
{text-indent: -1.5.em; margin-left: 1.5em; }" (If MLA specifies the size
of the indent, use that.)

[I see Peter Gorman just got this one posted.]

My hackles are up a little today, but I have to say I'm appalled at the
amount of markup hackery people still recommend.  1x1 transparent GIFs?
Even David Siegel bailed on those 4 years ago.  <DL> fakery?  For one
thing, a list is a list and a paragraph is a paragraph.  For another, any
attempt to guess how long a "line" is will be doomed to failure, since the
concept of a line is unknown in HTML.


Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu



More information about the Web4lib mailing list