Hi All,
I have a sample page http://www.cef-inc.com/testing/ff_print.html. If you load this sample and then do a print preview you will see a blank last page. If you inspect the header element and remove '<h2>Xxxxx Yyyyy Zzzzz</h2>' then no more blank last page.
Is this by design? Is my 'fixed' layout page to blame?
Thanks for any help,
Charles
position static causes extra blank page in print
-
- Posts: 148
- Joined: November 21st, 2003, 4:56 am
- Location: Edinburg, Texas
-
- Posts: 148
- Joined: November 21st, 2003, 4:56 am
- Location: Edinburg, Texas
-
- Posts: 173
- Joined: June 12th, 2012, 7:59 am
Re: position static causes extra blank page in print
Edit: Was irrelevant to actual problem
Last edited by Lnwdz on March 28th, 2018, 9:43 am, edited 1 time in total.
-
- Posts: 148
- Joined: November 21st, 2003, 4:56 am
- Location: Edinburg, Texas
Re: position static causes extra blank page in print
I was hoping to not have to make adjustments, like you have shown. And yes, I tried 4 different browsers and they all do the extra blank page. Position: absolute works great in Firefox and Chrome but not IE 11 and Edge. The problem is that IE and Edge will only print 1 page of a multiple page form. I think MS has a bug but since I can't get past the trolls at MSDN I can't ask MS about it (they blame my fixed layout design. They suggest I fit into the 'box' by looking into frameworks and/or templates). Position: static solves the IE/Edge problem but causes the extra blank page.
Maybe this question should be moved to the web development forum?
Thanks for your input,
Charles
Maybe this question should be moved to the web development forum?
Thanks for your input,
Charles
-
- Posts: 6437
- Joined: February 3rd, 2009, 6:29 pm
Re: position static causes extra blank page in print
See if anything in these threads are helpful in your case.
http://stackoverflow.com/questions/3697444
http://stackoverflow.com/questions/10902686
http://stackoverflow.com/questions/3697444
http://stackoverflow.com/questions/10902686
Last edited by morat on March 28th, 2018, 1:36 pm, edited 1 time in total.
- DanRaisch
- Moderator
- Posts: 127246
- Joined: September 23rd, 2004, 8:57 pm
- Location: Somewhere on the right coast
Re: position static causes extra blank page in print
Moving to Web Development per request.
-
- Posts: 148
- Joined: November 21st, 2003, 4:56 am
- Location: Edinburg, Texas
Re: position static causes extra blank page in print
Thank you,
Charles
Charles
- Frenzie
- Posts: 2135
- Joined: May 5th, 2004, 10:40 am
- Location: Belgium
- Contact:
Re: position static causes extra blank page in print
This is a question that takes ten seconds to test, so it should not be up to anyone reading this. The answer is no.CharlesEF wrote:Is my 'fixed' layout page to blame?
You can either try to figure out where you're inserting extra pixels through margin, padding, borders, etc. or just stick something like this in your print styles:
Code: Select all
html, body {height:99%}
Intelligent alien life does exist, otherwise they would have contacted us.
- jscher2000
- Posts: 11772
- Joined: December 19th, 2004, 12:26 am
- Location: Silicon Valley, CA USA
- Contact:
Re: position static causes extra blank page in print
Either of these will fix it by preventing top margin collapsing on the header -- the phenomenon of the top margin of the first element in a container poking out of the top of its containing element, which you can see by the position of the h2 within the header -- but I'm not sure why the second page is generated in the first place:
----
Actually, I think Frenzie has the answer: you have 100% height for the body. Somehow the margin-collapsing on the h2 is causing the page to exceed 100%.
Code: Select all
#header {
border-top: 1px solid red;
}
Code: Select all
#header {
padding-top: 1px;
}
Actually, I think Frenzie has the answer: you have 100% height for the body. Somehow the margin-collapsing on the h2 is causing the page to exceed 100%.