I have a web page which has many divs (listed like table rows), and the rows exceed the length of the page (within view, before you have to scroll down). I am using some JavaScript to toggle what information is displayed on my page (for example, number of rows.)
I have made a print.css file and have manaed to edit the style that is presented upon printing the page, however, only the window in view on my screen is printing (so loads of my records, which have to scroll down in the browser to view, are being left out of my printed document!!)
Does anyone have any ideas. Even when I hit print preview through FireFox and IE, it's only previewing the exact screen. Any help here is much appreciated!
I have a web page which has many divs (listed like table rows), and the rows exceed the length of the page (within view, before you have to scroll down). I am using some JavaScript to toggle what information is displayed on my page (for example, number of rows.)
I have made a print.css file and have manaed to edit the style that is presented upon printing the page, however, only the window in view on my screen is printing (so loads of my records, which have to scroll down in the browser to view, are being left out of my printed document!!)
Does anyone have any ideas. Even when I hit print preview through FireFox and IE, it's only previewing the exact screen. Any help here is much appreciated!
Share Improve this question edited Oct 28, 2010 at 9:39 Derek Paring asked Oct 28, 2010 at 9:12 Derek ParingDerek Paring 1192 silver badges6 bronze badges 3- Show example code which reproduces the problem please. – Athari Commented Oct 28, 2010 at 9:17
- I can't its for a business so it has to be kept private. The page is rendered via XSL though if that helps? And JavaScript basically lets the user hide/show certain information based on a select drop down menu item being selected. Any ideas as to why a print of the exact window I'm viewing is only ing out. (my own print css styles are working though) – Derek Paring Commented Oct 28, 2010 at 9:21
- 2 If you can't show the actual page, take the time to show an independent mock-up of the problem, it will make it much easier for people to give you reliable answers. – James B Commented Oct 28, 2010 at 9:31
1 Answer
Reset to default 5One possible cause of problem is that some block element is positioned absolutely and has scroll bars (overflow set to auto). When printing, overflown content will be hidden. You need to disable absolute positioning in your print.css. Example of this: http://pastehtml./view/1bo7tje.html
It is hard to tell without example reproducing the problem. You don't need to show the whole page with all the styles. Giving the simplest example still reproducing the bug will be enough. You can even locate the problem while you simplify the code.