Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css layout - second blank page when printing

Tags:

css

printing

im using the css file from this location:

http://peterned.home.xs4all.nl/examples/csslayout1.html

but somehow, when i print my page, the first page is perfect, but it starts to print a second page which is blank.

Ofcourse i only need the first page, but i cannot find why it prints a second blank page. Did someone encounter this before, or know what i should change?

I think somehow the css file has some properties in it, which makes my page maybe just a bit too big.

like image 623
user2133342 Avatar asked Mar 30 '13 11:03

user2133342


People also ask

How do you do a page-break in CSS?

The page-break-after property adds a page-break after a specified element. Tip: The properties: page-break-before, page-break-after and page-break-inside help to define how a document should behave when printed. Note: You cannot use this property on an empty <div> or on absolutely positioned elements.

What is @media print?

Print media, as you know is one of them. Print media is one of the oldest and basic forms of mass communication. It includes newspapers, weeklies, magazines, monthlies and other forms of printed journals. A basic understanding of the print media is essential in the study of mass communication.

What is page-break printing?

Page breaks are dividers that break a worksheet into separate pages for printing. Microsoft Excel inserts automatic page breaks based on the paper size, margin settings, scale options, and the positions of any manual page breaks that you insert.


1 Answers

I had the same problem just now and found user2624602 answer hepful.

In the css just add:

@media print { html, body { height: 99%; } }
like image 159
Dennis Bauszus Avatar answered Sep 24 '22 10:09

Dennis Bauszus