• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1203
  • Last Modified:

I want to print a page that have a horizontal scroll

Hi,

I want to know how to print whole page that contains a horizontal scroll inside a div,
When I try that , I only prints the part of the screen that is in the view while clicking print !
The rest is n't printed , How to print it ???


sample page is attached.. Try printing it , not all the div is printed .
Note : I want to print the div itself , rest of the page is n't important for me ...
1.html
0
darroosh
Asked:
darroosh
  • 2
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
Test page : http://fiddle.jshell.net/6xSKq/2/show/
Source : http://jsfiddle.net/6xSKq/2/
    @media print
    {
    	div { display: block;width:2048px !important; }
    }

Open in new window


More infos : http://www.w3.org/TR/CSS2/media.html
0
 
darrooshAuthor Commented:
Thank you , Good solution ..
I sloved it before  reading your  post by another  way  , posting it as it may help another  one..

When clicking the print button , I create a javascript variable  holding the content of the desired  div ..

Then by JQuery I made diplay:none for the whole page , Then add the content of the variable to the page , So that the page now only containing the desired div with width 100 %
Then print it ...

Then revrese the action back..
0
 
leakim971PluritechnicianCommented:
I prefer my solution :P

Have a nice week-end !
0
 
darrooshAuthor Commented:
Me too :P

Have a nice day !
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now