Courses/Design & Technique-Essential Web Design/CSS4print

From Publication Station
Revision as of 15:25, 4 October 2015 by Andre (talk | contribs) (Created page with "To make a PDF, print the page within the browser, and choose «Print to file». Important: choose the right page format (only Chromium's print preview can take the format sp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To make a PDF, print the page within the browser, and choose «Print to file».

Important: choose the right page format (only Chromium's print preview can take the format specified by the CSS).

@page

the page properties are defined by the @page rule. Itdefines a context for printing. Essentially it describes the paper sheet that the web page is going to be printed on.

  • size: page size
  • the margins,
  • orphans,
  • widows,
  • page breaks of the document.

https://developer.mozilla.org/en/docs/Web/CSS/@page


page-break-before page-break-after page-break-inside orphans widows


@media CSS at-rule

@media <media-query> {
  /* media-specific rules */
}

@media print