Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Landscape view 2

Status
Not open for further replies.

Slippenos

MIS
Apr 22, 2005
333
US
I have a website and it is a data access page. To print it, you need to set your page orientation to landscape and your margins to zero. Is there a way to have this automatically set up so you can just goto file | print and it will print out this way?

[red]Tools | Internet Options | Clear History[/red]
 
Good article. When I printed out the document- it was very mangled and scewed.

So I'm trying something new. My users can change the page orientation on their own- but asking them to change the margins as well might be asking too much.

Here is what I have in mind:

Code:
<STYLE type=text/css>

@media Print

{

BODY
    
	{
	BACKGROUND-IMAGE: none; 
	MARGIN: 0px; 
	BACKGROUND-COLOR: white;
	}

}

</STYLE>

However, it doesn't work. All the margins have to be zero and the orientation has to be landscape for this page to fit on one page.

Am I doing something wrong?

[red]Tools | Internet Options | Clear History[/red]
 
No, it does not work, because margins that appear on the printed page have nothing to do with margins on the body element. Margins you're trying to influence are not that easy to control. The only way I know is to use a component for IE and simply forget other browsers, since they will never let websites tinker with their settings. The component for IE can be found here:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top