| Author |
Creating paragraph spacing in css?
|
|
| TomHuffman 2004-06-09, 11:14 pm |
| I'm sure this is really simple, but I can't see it. How do you create a CSS style that includes parameters for paragraph spacing? I see line spacing and word spacing, but nothing for paragraph.
| |
| James Shook 2004-06-10, 12:14 pm |
| Work with margins on the <p> tag.
Bear in mind that successive margins will collapse. In other words, if
you set the top margin for <p> to be 50px, and the bottom margin to be
60px, two <p>s in a pod... I mean two consecutive <p>s will not have
100px (bottom of <p> 1 60px + top of <p> 2 50px = 110px) but will have
their margins collapse to the larger of the two, in this case 60px.
--
James M. Shook
http://www.jshook.com
| |
| James Shook 2004-06-10, 12:14 pm |
| James Shook wrote:
Eeek! Typo:
> two consecutive <p>s will not have
> 110px (bottom of <p> 1 60px + top of <p> 2 50px = 110px) but will have
> their margins collapse to the larger of the two, in this case 60px.
>
--
James M. Shook
http://www.jshook.com
| |
| Michael Fesser 2004-06-10, 12:14 pm |
| .oO(TomHuffman)
>I'm sure this is really simple, but I can't see it. How do you create a
>CSS style that includes parameters for paragraph spacing? I see line
>spacing and word spacing, but nothing for paragraph.
HTML:
<p>This is a paragraph.</p>
<p>And this another.</p>
CSS:
p {margin: 1em 0} /* This seems to be the default in many browsers. */
Micha
|
|
|
|
| Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |