[Prev][Next][Index][Thread]

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



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/



Follow-Ups: References: