HTML page graph in IE 7 when printing

How to set page margin in html when printing html?

I know that @page works on IE 8, IE 9. but it does not work on IE 7. So, I want to know how I can implement the same behavior in IE 7.

+4
source share
1 answer

As you pointed out and as confirmed in this article http://blog.orite.com.au/web_development/2009-04-09/css-implementation-chart-ie6-ie7-ie8/ , IE7 does not support @page directives.

If you absolutely need to manage this in IE7, then an option that you might consider would be to set an addition to your body element in the print stylesheet. Of course, you can do this in cm or in or any other size of your choice. As you could set this in your print sheet, the result will not affect ordinary page viewers. The disadvantage of this is that you cannot control the top and bottom margins of each page. If you are only after the left and right fields, this may be possible for you.

And here’s a quick CSS hack for targeting only on IE6 and 7, which can be used to prevent this printed page rule from becoming infected in all other browsers: http://briancray.com/posts/target-ie6-and-ie7-with-only -1-extra-character-in-your-css / .

+2
source

All Articles