@media print{@page {size: landscape}}

liunx

Guest
does this work ?
@media print{@page {size: landscape}}

And how do i tell @page it has to put the 5th page in landscape ?Read the CSS paged media specification (<!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/page.html#propdef-page">http://www.w3.org/TR/CSS2/page.html#propdef-page</a><!-- m -->) - it outlines some techniques of how that would be done. The CSS you posted is invalid because the @page rule is only applied to print media, regardless of where it is in the code. You only need the following:


@page {size: landscape}


I would suggest forced page breaks because not all printing paper is the same size. After the fifth forced page break, you can specify the change in @page media for that element.ok so i can only do that with a <style>@page {size:landscape}</style> after a page break in my html code ?Originally posted by gert cuykens
ok so i can only do that with a <style>@page {size:landscape}</style> after a page break in my html code ?

Read and inwardly digest the specification to which I linked. I did not say page break in HTML, I said you can force a page break by applying print media styles to an element.i tried to put every page in landscape to test it but this did not work

/*print style sheet*/

@page {size: landscape}
@media print{css code}

why not ?This also did not work

@page ls {size: landscape;}
@media print{body {page:ls;}}Do you have a link to the page in question?http://www.gert.easynet.be/cv/Odd, for some reason when I switch from "portrait" to "landscape," there is no difference; when I do the opposite, there is still no difference...And the solution is (roffeling drums)
writing-mode: tb-rl;
tena...

@page doesnt do anything
 
Back
Top