print-css

Chrome: Print preview differs from simulate CSS media print

北慕城南 提交于 2020-01-20 05:09:26
问题 I am having an issue when I print my page in Chrome 26 where tables appear with grey background colour. When I view the page in chrome with simulated CSS media print it looks fine When printing in Safari everything works fine. Anyone knows how to fix this issue? 回答1: Here is the solution: Add this to your print css * {transition: none !important} See: http://wisercoder.com/print-preview-significantly-different-inspector-chrome/ 回答2: You can try -webkit-print-color-adjust:exact; , which

How to make page border in print CSS for every single page

纵然是瞬间 提交于 2020-01-10 04:52:06
问题 I have a long HTML to print. Page is ready for printing but I need to border every single page. I added body { border:2px #666 solid; padding:5px; } in CSS code. HTML view is nice but print view is not. Because border-bottom is not showing first page and border-top is not showing all other pages. I hope, I can explain what I want. I'm searched and still searching for solution. And I think it's easy trick. But stil not found. 回答1: Try this it will help you : It will make border on full screen.

Force an element to take exactly half of available height in print media

ⅰ亾dé卋堺 提交于 2019-12-11 05:55:34
问题 I am dynamically creating elements (student bills) on a web page which I want to print. I want this element to take only half of the total printable height in print media, so that I can print two elements on one page. But in the picture, It's clear that some part of the third element is appearing on first page, which should actually go on the second page. How can I force this element (one student's bill) to take exactly half of the height of the page? <div class="col-md-6"> <div id="page-wrap

Page break not working with tbody issue

送分小仙女□ 提交于 2019-12-09 05:44:52
问题 I am generating print report using table in twitter-bootstrap layout. I am having multiple tbody inside table ; While Printing i need page-break-after while each tbody so i have applied print-css @media print { tbody{ page-break-after: auto; page-break-inside: avoid; border: none !important; margin-bottom: 20px !important; } } the issue while applying style page-break-after to tbody , pagebreak not working see here but when applying display:block to tbody gives me desired result but the

How to make HTML pages print at a consistent size from Chrome?

ε祈祈猫儿з 提交于 2019-11-30 11:51:23
问题 I'm designing a set of HTML pages to be printed, and I want elements of the pages to end up the same scale as each other. For example, there's a class of div whose width is defined as 200px wide appears on each of several pages. I want it to appear precisely the same size when each page is printed (suitable for, e.g., cutting out and superimposing). I'm using a few things that work best in Chrome (mainly the CSS zoom rule to have smaller copies of elements elsewhere), so ideally I'd like to

Print table footer at the very bottom on last page

南笙酒味 提交于 2019-11-29 16:26:13
问题 I am using a table to create a footer on every page (works in Firefox, that's enough). A JS Fiddle: https://jsfiddle.net/j9k2xzze/ (right click on the output pane -> This Frame -> Open Frame in New Tab. Then Print Preview will function as normal) <table id="wrapper"> <thead> <tr> <td id="header"></td> </tr> </thead> <tfoot> <tr> <td colspan="0" id="footer"> <img src="footer.jpg"/> </td> </tr> </tfoot> <tbody> <tr> <td id="content"> <?php echo $html; ?> </td> </tr> </tbody> </table> But on the

How to make page border in print CSS for every single page

白昼怎懂夜的黑 提交于 2019-11-29 13:24:32
I have a long HTML to print. Page is ready for printing but I need to border every single page. I added body { border:2px #666 solid; padding:5px; } in CSS code. HTML view is nice but print view is not. Because border-bottom is not showing first page and border-top is not showing all other pages. I hope, I can explain what I want. I'm searched and still searching for solution. And I think it's easy trick. But stil not found. Try this it will help you : It will make border on full screen. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>Border around content</title>

Chrome: Print preview differs from simulate CSS media print

為{幸葍}努か 提交于 2019-11-29 07:19:56
I am having an issue when I print my page in Chrome 26 where tables appear with grey background colour. When I view the page in chrome with simulated CSS media print it looks fine When printing in Safari everything works fine. Anyone knows how to fix this issue? Here is the solution: Add this to your print css * {transition: none !important} See: http://wisercoder.com/print-preview-significantly-different-inspector-chrome/ You can try -webkit-print-color-adjust:exact; , which overrides the setting where Chrome removes background colors. This could fix your problem. 来源: https://stackoverflow

How to see the print media CSS in Firebug?

纵饮孤独 提交于 2019-11-28 18:31:05
Firebug is an excellent tool to to show a screen media CSS for some HTML element, but is there a way to look at the print media CSS too? Or is there any other tool to see the print media CSS? I would have never expected this to work, but it does. Install -both- the 1.5 beta of Firebug and Web Developer. When you choose the print css from Web Developer, the tools in Firebug suddenly work on the new print version of the page. So far I haven't found any problems with running both at the same time. Mads Mobæk What about Web Developer Toolbar? https://addons.mozilla.org/en-US/firefox/addon/60 when

Printing fieldsets in firefox

懵懂的女人 提交于 2019-11-28 09:13:42
I've been adding some new css to an existing project (using media="print") in the page header. It's going smooth and (for once!) IE is giving nice, expected results, but Firefox does not... The problem is that I have a fieldset which contains a lot of fields, and Firefox completely refuses (even in the latest version) to allow a page break inside the fieldset. This means anything that doesn't fit on one page is lost... I've found the bug acknowledged on the mozilla website which has been open for 3 years - https://bugzilla.mozilla.org/show_bug.cgi?id=471015 - but can't find any reasonable