Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Using CSS to Force Landscape Printing in IE

, 15 Feb 2012
How to force landscape printing using CSS styles
landscape_print_in_ie_demo.zip
Landscape_Print_in_IE_demo
includes
icons
b_print.png
cross.gif
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="ltr" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Print Preview Test</title>
<script language="javascript" src="includes/Script.js"></script>
</head>

<body marginwidth="0" border="2" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-------------------------------------------------------------------------------------->
<div id="page1" >
	 		<table border="1" width="70%" cellspacing="0" cellpadding="2" >
              <tr class="dataTableHeadingRow">
                <th class="dataTableHeadingContent">Class Number</th>
                <th class="dataTableHeadingContent">Class Name</th>
			   </tr>	
			<tr>
			<td class="main">Alg1</td>
			<td class="main">Algebra 1</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">Algebra 2</td>
			</tr>
			<tr>
			<td class="main">Sign1</td>
			<td class="main">American Sign Language 1</td>
			</tr>
			<tr>
			<td class="main">Archery</td>
			<td class="main">Archery</td>
			</tr>
			<tr>
			<td class="main">BD01</td>
			<td class="main">Belly Dance</td>
			</tr>
			<tr>
			<td class="main">Bio</td>
			<td class="main">Biology with Lab</td>
			</tr>
			<tr>
			<td class="main">Cam35</td>
			<td class="main">Camera 35: Using your SLR film or Digital Camera</td>
			</tr>
			<tr>
			<td class="main">Chair</td>
			<td class="main">Chaircaning</td>
			</tr>
			<tr>
			<td class="main">Chinese Brush</td>
			<td class="main">Chinese Brush Painting</td>
			</tr>
			<tr>
			<td class="main">Civecon</td>
			<td class="main">Civics-Economics</td>
			</tr>
			<tr>
			<td class="main">drawwork</td>
			<td class="main">Drawing Workshop</td>
			</tr>
			<tr>
			<td class="main">DE17</td>
			<td class="main">Driver Education#17</td>
			</tr>
			<tr>
			<td class="main">DE19</td>
			<td class="main">Driver Education#19</td>
			</tr>
			<tr>
			<td class="main">EngMon</td>
			<td class="main">English</td>
			</tr>
			<tr>
			<td class="main">French1Lev2</td>
			<td class="main">French 1 Level 2</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">French 2 Level 2</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">French Advanced Conversation Workshop</td>
			</tr>
			<tr>
			<td class="main">Gardensell</td>
			<td class="main">Gardening to Sell</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">Gardening to Sell</td>
			</tr>
			<tr>
			<td class="main">Genresearchadv</td>
			<td class="main">Genealogical Research: Advanced</td>
			</tr>
			<tr>
			<td class="main">Genealogyfamily</td>
			<td class="main">Genealogical Research: Organizing and Writing Your Family Histo</td>
			</tr>
			<tr>
			<td class="main">Germ1Lev2</td>
			<td class="main">German 1 Level 2</td>
			</tr>
			<tr>
			<td class="main">Guitar1</td>
			<td class="main">Guitar 1</td>
			</tr>
			<tr>
			<td class="main">Guitar2</td>
			<td class="main">Guitar 2</td>
			</tr>
			<tr>
			<td class="main">Batik</td>
			<td class="main">Inroduction to Batik</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">J2EE</td>
			</tr>
<!--
</table>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div id="page2" class="myDiv">

<table border="1" width="70%" cellspacing="0" cellpadding="2" >
-->
			<tr>
			<td class="main"></td>
			<td class="main">J2EE</td>
			</tr>
			<tr>
			<td class="main">Karate1</td>
			<td class="main">Kempo Karate 1</td>
			</tr>
			<tr>
			<td class="main">Karate2</td>
			<td class="main">Kempo Karate 2</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">Knitting and Crocheting 1</td>
			</tr>
			<tr>
			<td class="main">Knit2</td>
			<td class="main">Knitting and Crocheting 2</td>
			</tr>
			<tr>
			<td class="main">Landscape</td>
			<td class="main">Landscaping for the Homeowner</td>
			</tr>
			<tr>
			<td class="main">OA2007</td>
			<td class="main">Orace 10g</td>
			</tr>
			<tr>
			<td class="main">Photoseminar</td>
			<td class="main">Photography Seminar</td>
			</tr>
			<tr>
			<td class="main">Piano1</td>
			<td class="main">Piano 1</td>
			</tr>
			<tr>
			<td class="main">Piano 2Improvise</td>
			<td class="main">Piano 2-Learn to Improvise</td>
			</tr>
			<tr>
			<td class="main">Pool</td>
			<td class="main">Pool School: Learn Pocket Billiards Like a Pro</td>
			</tr>
			<tr>
			<td class="main">Prealgebra</td>
			<td class="main">PreAlgebra</td>
			</tr>
			<tr>
			<td class="main">Quilt1</td>
			<td class="main">Quilting 1</td>
			</tr>
			<tr>
			<td class="main">REpre</td>
			<td class="main">Real Estate (prelicensing)</td>
			</tr>
			<tr>
			<td class="main">Recipes</td>
			<td class="main">Recipes for Health: A Nutrition Workshop</td>
			</tr>
			<tr>
			<td class="main">Reiki1</td>
			<td class="main">Reiki 1</td>
			</tr>
			<tr>
			<td class="main">Reiki2</td>
			<td class="main">Reiki 2</td>
			</tr>
			<tr>
			<td class="main">Repairs</td>
			<td class="main">Repairs for the Homeowner</td>
			</tr>
			<tr>
			<td class="main">Rubber1</td>
			<td class="main">Rubber Stamping 1</td>
			</tr>
			<tr>
			<td class="main">Rubber2</td>
			<td class="main">Rubber Stamping 2</td>
			</tr>
			<tr>
			<td class="main">Russian1</td>
			<td class="main">Russian 1</td>
			</tr>
			<tr>
			<td class="main">Russian2</td>
			<td class="main">Russian 2</td>
			</tr>
			<tr>
			<td class="main">Fears</td>
			<td class="main">Say Good-bye to Your Fears</td>
			</tr>
			<tr>
			<td class="main">Scrap</td>
			<td class="main">Scrapbooking</td>
			</tr>
			<tr>
			<td class="main">Selfhyp</td>
			<td class="main">Self Hypnosis</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">Small Engine Repair</td>
			</tr>
			<tr>
			<td class="main">Sourdough</td>
			<td class="main">Sour Dough Bread Making</td>
			</tr>
			<tr>
<!--
</table>
</div>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div id="page3" class="myDiv">
<table border="1" width="70%" cellspacing="0" cellpadding="2">
-->
			<td class="main">Span1Lev1</td>
			<td class="main">Spanish 1 Level 1</td>
			</tr>
			<tr>
			<td class="main">Span1Lev1</td>
			<td class="main">Spanish 1 Level 2</td>
			</tr>
			<tr>
			<td class="main">Span1Lev3</td>
			<td class="main">Spanish 1 Level 3</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">Starting Seeds Indoors</td>
			</tr>
			<tr>
			<td class="main">YogaMon</td>
			<td class="main">Stress Management through Yoga</td>
			</tr>
			<tr>
			<td class="main"></td>
			<td class="main">Stress Management through Yoga</td>
			</tr>
			<tr>
			<td class="main">Homeschool</td>
			<td class="main">Successful Homeschooling</td>
			</tr>
			<tr>
			<td class="main">Vegcooksoy</td>
			<td class="main">Total Vegetarian Cooking: Creative Cooking with Soy</td>
			</tr>
			<tr>
			<td class="main">Vegcookcomfort</td>
			<td class="main">Total Vegetarian Cooking: Down Home Comfort</td>
			</tr>
			<tr>
			<td class="main">Vegcooklunches</td>
			<td class="main">Total Vegetarian Cooking: Portable Lunches</td>
			</tr>
			<tr>
			<td class="main">TravelRussia</td>
			<td class="main">Travel Tips to Russia</td>
			</tr>
			<tr>
			<td class="main">Ukranian</td>
			<td class="main">Ukranian Egg Decorating</td>
			</tr>
			<tr>
			<td class="main">Stockmkt</td>
			<td class="main">Understanding the Stock Market</td>
			</tr>
			<tr>
			<td class="main">Weld1</td>
			<td class="main">Welding 1</td>
			</tr>
			<tr>
			<td class="main">Yogacertpatanjali</td>
			<td class="main">Yoga Instructor Certification:Hatha Yoga and the Yoga Sutras of</td>
			</tr>
		</table>
</div>		
<!-------------------------------------------------------------------------------------->
<br><br>&nbsp;
<input type="button" style="width: 100px; height: 25px" id="printlink" value="Print" onclick="getPrint('page1',69,1);" >
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

zl2934046

Canada Canada
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 15 Feb 2012
Article Copyright 2006 by zl2934046
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid