Advertisement

09.13.2008 at 03:27PM PDT, ID: 23729355
[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.0

CSS and print margins: how do I get a smaller top and bottom margin?

Asked by anAppBuilder in Cascading Style Sheets (CSS), Hypertext Markup Language (HTML), Internet Explorer Web Browser

Tags: ,

When I do print preview (shrink to fit) in IE7 on the attached code, I get quite a large top and bottom margin.  Following some great suggestions from tomaugerdotcom and scrathcyboy I've gotten the margins to be smaller.  However other sites get even smaller top and bottom margins.  What am I missing?

One constraint is that the pages need to work without javascript.

Example site:with smaller margins: http://daphnesgreekcafe.munchaway.com/  (BTW the only relationship I have to the Daphne's site is that I order take out food from them)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:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
<!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'>
		
		* { 
			margin:0; 
			padding:0; 
			border:none; 
			border-collapse:collapse; 
		}
 
		h1 {
			margin-top: 1em;
			}
			
		h2 {
			margin-top: 1em;
		}
		
		h3 {
			margin-top: 1em;
		}
		
		p { 
			margin-top: 1em;
		}
		
		#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: 10.5in;
		}
 
		@media print {
			#bottomDivision {
				position:absolute;
				width:100%;
				height: 0;
				top:0;right:0;bottom:0;left:0;
				border-style: none;
				margin-top: 10.25in;
			}
		}
	
		#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: .25in;
			margin-bottom: 0;
			background-color: yellow;
			
		}		
			
		@media print {
			#mainDivision {
				width: 8.5in; 
				height: 10.25in;
				position: absolute;
				left: 50%;
				margin-left: -4.25in;
				margin-right: 0;
				margin-top: 0;
				margin-bottom: 0;
				padding: 0;
			}
		}
		
		#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>
[+][-]09.13.2008 at 05:41PM PDT, ID: 22470639

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09.13.2008 at 06:27PM PDT, ID: 22470740

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.14.2008 at 10:43AM PDT, ID: 22473535

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09.14.2008 at 10:44AM PDT, ID: 22473540

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09.14.2008 at 10:48AM PDT, ID: 22473560

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.20.2008 at 05:47PM PDT, ID: 22532670

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
[+][-]09.26.2008 at 11:03AM PDT, ID: 22582054

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
[+][-]09.26.2008 at 11:36AM PDT, ID: 22582390

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), Hypertext Markup Language (HTML), Internet Explorer Web Browser
Tags: CSS, ie7
Sign Up Now!
Solution Provided By: crush83
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628