Solved

I want to print a page that have a horizontal scroll

Posted on 2013-12-04
4
1,059 Views
Last Modified: 2013-12-06
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
Comment
Question by:darroosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39698228
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
 

Author Comment

by:darroosh
ID: 39701339
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
 
LVL 82

Expert Comment

by:leakim971
ID: 39702112
I prefer my solution :P

Have a nice week-end !
0
 

Author Comment

by:darroosh
ID: 39702169
Me too :P

Have a nice day !
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question