Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 1st, 2005, 06:01 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing the whole width

Hi, I have a problem qith IE.
I have a page wich has a scroll right bar because all the content doesn't fit on the page.
I have a print button which does a window.print
However it doen't print the whole content of the page only what you can see.
I download a free control which was fitting all the width content on the page and it works ok, however I don't want to install this control on all the clients.
Does anyone knows how to do that using javascript, CSS or whatever it suits it?

Thanks
 
Old July 1st, 2005, 06:59 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

This is a known "feature" of IE.
You can create a printer friendly version of your page using CSS. Have a stylesheet with the @media set to print. Set the width of the page to something that will print.
Code:
<style type="text/css">
@media print {
   body {width: 20cm;}
}
</style>
You may have do a bit of trial and error to get the width that will work.



--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Width Irritation asearle HTML Code Clinic 2 October 30th, 2007 02:13 AM
capturing printing settings when printing reports nikolaosk Access VBA 0 February 8th, 2005 04:14 AM
Height and Width? venkatesh_anmca Beginning VB 6 0 January 31st, 2005 05:13 AM
Column width immanuelsamuel Oracle 2 March 13th, 2004 10:30 AM
Width in pixels from width in percentage bsausser Classic ASP Basics 1 December 31st, 2003 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.