Re: Preventing vertical margin collapsing across page breaks
Lee Passey <[email protected]>
| Newsgroups | gmane.culture.literature.e-books.gutenberg.volunteers |
|---|---|
| Message-ID | <[email protected]> |
On 11/2/2012 12:29 PM, Robert Gibbins wrote:
[snip]
> I had to think of this myself, once I realised what the problem was, and it
> does feel a bit like an ugly kludge (for example the zero height line still
> has a non-breaking space at its start). I wonder if any one knows a better
> way to achieve the same end.
Mr. Perathoner's solution was unsatisfying to me because it required a
header element, or some other element identified as the first of the
container, to contain the appropriate styling. Following up on his hint,
however, I discovered that the key is in using the "padding-top"
attribute instead of the "margin-top" attribute.
Experimentation revealed that using
div.chapter
{
page-break-before:always;
padding-top:1em;
/* any other chapter styling you want goes here */
}
appears to create the effect you are looking for. No need for the second
element to be styled in any way other that default styling.
_______________________________________________
gutvol-d mailing list
gutvol-d-4LCm/o+qPMZ96Xl/[email protected]
http://lists.pglaf.org/mailman/listinfo/gutvol-d