/    Sign up×
Community /Pin to ProfileBookmark

Setting PAGE SETUP LANDSCAPE when printing..?

When someone click the print button, i want the page to be set to LANDSCAPE automatically without them having to go to page set up..

I am reading thru www.w3.org/…./page.html
and from there, i got the following ideas…

I tried doing the following but nothing seems to work..

<STYLE type=”text/css” media=”print”>
@page { size: 11in 8.5in; }
</STYLE>

AND

<STYLE type=”text/css” media=”print”>
@page { size: landscape; }
</STYLE>

Any suggestions..??

Is there anything, i need to do or say in the <BODY> section?

THank you..

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@Robert_WellockJul 11.2003 — You might have a rubbish browser; because if you followed the CSS Recommendations correctly it should have worked and it does work in Mozilla.
Copy linkTweet thisAlerts:
@HesterJul 11.2003 — You might have a rubbish browser;[/quote]

Perhaps he is on IE.?
Copy linkTweet thisAlerts:
@cakedayauthorJul 11.2003 — I am on IE version 6.0+

If you don't mind, can you please give me the code for the same?

THank you!
Copy linkTweet thisAlerts:
@Robert_WellockJul 18.2003 — &lt;style type="text/css" media="print"&gt;
@page { size: landscape; }
&lt;/style&gt;


The above code was correct however; the latest versions of Mozilla seem to have special printing function that can override the CSS print orientation. If you view the page within Opera 7.xx you'll notice the CSS works.
×

Success!

Help @cakeday spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...