Advertisement

09.10.2008 at 02:07PM PDT, ID: 23720944
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

How do I control print margins using css?

Asked by anAppBuilder in Cascading Style Sheets (CSS), Internet Explorer Web Browser

Tags: ,

I am creating a page that people will also print.  In the code attached I have set the top and bottom margins for @media print to 0.  However iE7 still seems to require a large bottom margin.  

In the code if I add even .25 inch to the helght of insideTheMargins and mainDivision, the print preview shrink to fit goes to 2 pages leaving a large bottom margin on the first page and printing nothing on the second.

In this case it does not appear that the rule of adding th margins in the document to those set in print preview is being applied.  Is there a way to fix this?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<!-- @title -->
		<title>Sample Test Page Margins</title> 
		<!-- @@title -->
		
		<style type='text/css'>
		
		#body {
			font-family:tahoma, verdana, arial, helvetica, geneva, sans-serif;
		}
		
		#bottomDivision {
			position:absolute;
			width:100%;
			height: .25in;
			top:0;right:0;bottom:0;left:0;
			border-style: none;
			margin-top: 9in;
		}
	
		#copyrightDivision {
			position: absolute;
			width: 90%;
			text-align: center;
			font-size: xx-small;
			bottom: 0;
			background-color: fuchsia ;
		}
		
		#insideTheMargins { 
			position: relative;
			height: 9.5in;
			margin-top: .5in; /* print adds this to its margin */
			margin-bottom: .5in;
			margin-left: .75in;
			margin-right: .75in;
			background-color: aqua;
		}
		
		@media print {
			#insideTheMargins {  
				position: relative;
				height: 9.5in;
				margin-left: .5in;
				margin-right: .5in;
				margin-top: 0;
				margin-bottom: -.25;
				z-index: 10;
			}
		}
		
		#mainDivision {
			width: 8.5in; 
			height: 10.5in;
			position: absolute;
			left: 50%;
			margin-left: -4.25in;
			margin-right: 0;
			margin-top: 0;
			margin-bottom: 0;
			background-color: yellow;
		}			
		
		#outerDivision {
			position:fixed;
			width:100%;
			top:0;right:0;bottom:0;left:0;
			border-style: none;
		}
 
		</style>
	</head>
 
	<body id = 'body'>
		<!-- OUTER DIVISION -->
		<div id = 'outerDivision'
			style = 'background-color: lime;'>
		</div> <!-- OUTER DIVISION -->
		
		<!-- MAIN DIVISION -->
		<div id = 'mainDivision' > 
			<!-- INSIDE THE MARGINS DIVISION -->
			<div id = 'insideTheMargins'>
			
				<h1 style = 'background-color: fuchsia; width: 90%;'>Page Title</h1>
			
				<div>
					<p id = 'copyrightDivision'>  Copyright Notice </p>
				</div>
			</div>  <!-- INSIDE THE MARGINS DIVISION -->
		</div>  <!-- MAIN DIVISION -->
		
		<!-- BOTTOM DIVISION -->
		<div id = 'bottomDivision'>
		</div>
	</body>
</html> 
Open in New Window Select All Tags: 
css, ie 7 Zones: 
Cascading Style Sheets (CSS), Hypertext Markup Language (HTML), Internet Explorer Web Browser
[+][-]09.11.2008 at 05:48AM PDT, ID: 22449111

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Internet Explorer Web Browser
Tags: css, IE 7
Sign Up Now!
Solution Provided By: tomaugerdotcom
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.11.2008 at 05:05PM PDT, ID: 22456167

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 10:54PM PDT, ID: 22465832

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.13.2008 at 08:20AM PDT, ID: 22467912

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.13.2008 at 11:41AM PDT, ID: 22468666

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2008 at 03:31PM PDT, ID: 22470248

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628