If you do not require IE6 support, you can use:
div, h1, p { margin: 0; } p + p { margin-top: 12px; }
If you need to support IE6, this is a dirty hack, but it works without Javascript:
div, h1, p { margin: 0; } h1 { margin-bottom: -12px; } p { margin-top: 12px; }
The disadvantage of this method is that you cannot just use, say, 1em for balancing fields, since they have different font sizes. You can manually adjust as needed or use the width of the pixels.
cletus
source share