Questions tagged [css-print]

CSS print group the techniques and tools to style the content for print media or for screens in print preview mode. With CSS, you can define page breaks, control printable area, style left and right pages differently, etc.

37 questions
1
vote
2 answers

Print 3 x 3 html table with rectangle cells

I use the following styles to print my 9 x 9 HTML table: td { border: 2px solid; } @media print { body { margin: 0; padding: 0; } table { height: 100vh; width: 100vw; } td { margin: 20px; width: 33.3%; …
1
vote
1 answer

css @media print for landscape mode

I'm printing some images with a header/footer, and trying to distinguish between Portrait and Landscape using @media print queries. In my first version, I was only using max-width: 8.5in - and it printed fine. However, if the user prints in…
bob.mazzo
  • 5,183
  • 23
  • 80
  • 149
1
vote
1 answer

How to pass CSS href to inline CSS in app script?

UPDATE: I need to save an HTML webpage as a pdf in my google Drive. I am using app script. However, the PDF is rendered differently from the HTLM page. I need the PDF to be the same as the HTML. FROM RESEARCH I DISCOVERED THAT EXTERNAL CSS IS NOT…
1
vote
1 answer

CSS - Print html document

I have a report in html format that needs to be printed both in landscape and in portrait Can I use "@page {size: landscape / portrain}" property for individual blocks?
1
vote
0 answers

CSS Grid split to multiple pages when printing

I organize img elements into grid using grid layout. The issue is during printing, the grid cells, that are on the page split get divided. It is not really surprising, but I would like them not to. I would like to find a way to tell the grid to…
Lukáš Řádek
  • 1,273
  • 1
  • 11
  • 23
1
vote
0 answers

CSS Printing - Divs positioned over multiple pages and I want to add margins to prevent text being hidden under the positioned divs

I'm writing an invoice webapp for a client and I'm trying to update the page layout so if the text in one section overflows then the printed page will look nice and not horrid like it does now. Each page when printed if the text overflows the first…
1
vote
1 answer

Css with print-media is included in PageSpeed Insights "Unused CSS"

I'm using Google PageSpeed Insights and one problem appears under "Remove unused CSS" I'm using a separate css for print-media: Apparently, PageSpeed Insights…
1
vote
1 answer

Why is my webpage printing an extra blank page?

I can't figure out why my html document is printing an extra blank page. I tried shrinking the content and increasing the margins of the printed page to no avail. The document should produce only one printed page but it is producing a second blank…
weshedrick
  • 181
  • 1
  • 2
  • 10
1
vote
0 answers

Footer not appearing in Chrome while it is working in Internet Explorer

In CSS media print, I want two headers and two footers to appear in all the pages. I have written the code here and it is working fine while printing in IE but in Chrome, the "Footer within the text" is not appearing in first two pages. It shows…
1
vote
0 answers

Fitting multiple pages in one page, while using CSS print media

I want to print multiple pages like 2(50% each) or 4(25% each) pages in one page by shrinking them using CSS media print. I could only see options like changing the setting of the page while printing it, but I don't want that. Can anyone suggest…
0
votes
0 answers

Set @page margins but exclude header and footer

I've got following code: Test