Forum How do I...?

Rotate tables

frappierer
Hi there,

i am trying to "rebuild" a css that it looks alike another PDF and have one major problem. I need to rotate a table by -90 degrees (or 270 degrees).

I gave a class to the table ( <table class="tablefix" style="text-align: left;">). My Css looks like that:

.tablefix {
transform:rotate(-90.0deg);
page-break-before: always;
table-layout: fixed;
position: absolute;
top: 0;
height:100%;
width:100%;
}

as you can see in the picture (left) its always messy. Whatever i do, it never fits into the page. Without the rotation it works just fine (page fit) but when i rotate the table, no css (width, height, positioning) seems to work.

Anyone has some idea how i could make it work?

The table should look like the one on the right.
  1. Table-Fix.jpg206.6 kB
    Left side :my css |Right side: original
rpilkey
You have changed the orientation, but I think you have to also change the page dimensions, something like this:
@page landscape_page {
    size: landscape;
    height:  7.5in;
    width: 10in;
}

.landscape {
    page: landscape_page;
}