-1

I'm building a web app that is basically a giant form which then generates a document for printing.

Is it possible to define where the page will break purely with HTML/CSS?

For instance, could I define that a certain element must always appear on top of a page when printing?

Tiago
  • 4,233
  • 13
  • 46
  • 70
  • what do you mean with pagebreak? When you print the page? On screen you should think about splitting the form into different pages with some pagination tecnique – Lelio Faieta Oct 05 '15 at 10:35

1 Answers1

1

You need page-break css properties.

h1 {
    page-break-before: always;
}

Also I can recommend some general advice and useful tips for printing stylesheets in this Smashing Magazine article.

antejan
  • 2,594
  • 12
  • 15