Hello,
I am trying to create a CSS class that turns the content of a page to an oriented landscape.
However the following code doesnt seem to work correctly.
I have tried creating multiple classes of .landscape using the following code. (.landscape1, .landscape2, .landscape3)
Which works, the only problem now is that. I am only able to use this class once, because of the page.
Also I was wondering why the page-break:avoid doesnt work.
Thanks in advance,
Emiel
I am trying to create a CSS class that turns the content of a page to an oriented landscape.
However the following code doesnt seem to work correctly.
.landscape {
@page {
size: A4 landscape;
margin:2cm;
page-break-before:avoid;
page-break-after:avoid;
}
}
I have tried creating multiple classes of .landscape using the following code. (.landscape1, .landscape2, .landscape3)
Which works, the only problem now is that. I am only able to use this class once, because of the page.
div.landscape, table.landscape, img.landscape, span.landscape {
page: landscape_page;
}
@page landscape_page {
size: A4 landscape;
margin: 2cm;
page-break-before:avoid;
page-break-after:avoid;
}
Also I was wondering why the page-break:avoid doesnt work.
Thanks in advance,
Emiel