W3C home > Mailing lists > Public > www-style@w3.org > June 1997

Re: Distance between <P> (and other) tags?

From: Todd Fahrner <fahrner@pobox.com>
Date: Mon, 2 Jun 1997 09:45:28 -0700
Message-Id: <v03102801afb8a6c3c258@[206.86.219.22]>
To: "Jonas Salling" <salling@cooper.xanthus.se>, <www-style@w3.org>
At 3:03 PM -0100 6/2/1997, Jonas Salling wrote:
> Is it possible to achieve the effect of <P> tags being
> separated using CSS without getting unwanted space
> at the top and/or bottom of the containing block?

I take it you are using IE3? There is a well-known bug in this
implementation, affecting all (?) block-level elements like <Hn>, <P>,
etc., that will prevent you from achieving the desired effect. The bug is
fixed in IE4b1, and NS4b5 has nearly got it right.

The code you want is

	P { margin-top: 0;
		margin-bottom: 0
	}

The actual space separating paragraphs should equal the line-height
specified for paragraphs. NS4b5 uses some other figure, though.

If you really need to hack something together for IE3, try replacing all of
your <P></P>'s with <DIV CLASS=P></P>'s. Then write

	.P { margin-top: 0;
		 margin-bottom: 0
	}

__________________
Todd Fahrner
mailto:fahrner@pobox.com
http://www.verso.com/
Received on Monday, 2 June 1997 12:44:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:50 GMT