View Single Post
Old 08-28-2014, 11:17 AM   #31
Psymon
Chief Bohemian Misfit
Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.
 
Psymon's Avatar
 
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
Quote:
Originally Posted by Jellby View Post
- Use a dummy element after the pagebreak. This is something like your solution, but keep your margin-top in the <h1>. Or actually use the dummy element to introduce the pagebreak:

Code:
<div class="full-page-image">
<img ... />
</div>

<div class="pagebreak" style="page-break-before:always; height:0; margin:0; padding:0"></div>

<h1 style="margin-top:42px">Title</h1>
Ah, I think I'll do that one! Thanks!

That page-break thing does work "everywhere", though? I have this weird feeling that I read somewhere (ages ago) that some devices or apps just ignore it.

One question about the code you gave, where you had this...

Code:
<div class="pagebreak" style="page-break-before:always; height:0; margin:0; padding:0"></div>
...re the class="pagebreak", is there something I should be putting in my stylesheet to go along with that?

Thanks again! This is so reassuring, to think that this will actually resolve my original problem!

EDIT: I'm slow. I gather that all I need to do, from what you said, is basically put this in my HTML...

Code:
<div class="pagebreak"></div>
...and then this in my stylesheet...

Code:
div.pagebreak {page-break-before:always; height:0; margin:0; padding:0;}
I think I was overthinking it -- I gather that's what you meant, though?

Last edited by Psymon; 08-28-2014 at 11:22 AM.
Psymon is offline   Reply With Quote