Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I want to print a page that have a horizontal scroll

Posted on 2013-12-04
4
Medium Priority
?
1,166 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

618 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