1

HI! I need help!
I creating a table, but have some problems with text alignment (the text is not aligned in cells)
When I use rowspan and rotate then incorrectly selected coordinate beginning of the text, and cell height (when I want to set the height of the cell its width varies)
My source:
<style type="text/css"> <!-- div { font-size: 4pt; } .h { rotate: 0; vertical-align: middle; text-align: center; } .vd { rotate: 90; text-align: center; vertical-align: middle; } .k { width: 10mm; height: 1mm; rotate: 90; vertical-align: middle; text-align: center; } td { border: solid 0.5px black; border-spacing: 0px; vertical-align: middle; text-align: center; } --> </style> <page style="border-spacing: 0px;font-family: freesans" backleft="5mm" backright="5mm" backtop="10mm" backbottom="10mm" > <table style="border: solid 1px black; width: 200mm;" cellspacing="0"> <?php $a=100/61; for($k=0; $k<61; $k++) { ?> <col style="width:<?php echo $a;?>%"> <?php } ?> <tr> <td rowspan="2"> <div class="k">&#1050;&#1091;&#1088;&#1089;</div> </td> <?php $month=array(1=>'&#1042;&#1077;&#1088;&#1077;&#1089;&#1077;&#1085;&#1100;','&#1046;&#1086;&#1074;&#1090;&#1077;&#1085;&#1100;','&#1051;&#1080;&#1089;&#1090;&#1086;&#1087;&#1072;&#1076;','&#1043;&#1088;&#1091;&#1076;&#1077;&#1085;&#1100;','&#1057;&#1110;&#1095;&#1077;&#1085;&#1100;','&#1051;&#1102;&#1090;&#1080;&#1081;','&#1041;&#1077;&#1088;&#1077;&#1079;&#1077;&#1085;&#1100;','&#1050;&#1074;&#1110;&#1090;&#1077;&#1085;&#1100;','&#1058;&#1088;&#1072;&#1074;&#1077;&#1085;&#1100;','&#1063;&#1077;&#1088;&#1074;&#1077;&#1085;&#1100;','&#1051;&#1080;&#1087;&#1077;&#1085;&#1100;','&#1057;&#1077;&#1088;&#1087;&#1077;&#1085;&#1100;'); $res=''; $i=0; foreach($month as $name){ $i++; $l=(($i==2)||($i==4)||($i==7)||($i==10))?5:4; $res.='<td class="h" colspan="'.$l.'"><div class="h">'.$name.'</div></td>'; } echo $res; ?> <td rowspan="2"> <div class="v">&#1058;&#1077;&#1086;&#1088;. &#1085;&#1072;&#1074;&#1095;&#1072;&#1085;&#1085;&#1103;</div> </td> <td rowspan="2"> <div class="v">&#1045;&#1082;&#1079;&#1072;&#1084;&#1077;&#1085;&#1080;</div> </td> <td rowspan="2"> <div class="v">&#1053;&#1072;&#1074;&#1095;&#1072;&#1083;&#1100;&#1085;&#1072; &#1087;&#1088;-&#1082;&#1072;</div> </td> <td rowspan="2"> <div class="v">&#1042;&#1080;&#1088;&#1086;&#1073;&#1085;&#1080;&#1095;&#1072; &#1087;&#1088;-&#1082;&#1072;</div> </td> <td rowspan="2"> <div class="v">&#1044;&#1080;&#1087;&#1083;&#1086;&#1084;. &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;</div> </td> <td rowspan="2"> <div class="v">&#1044;&#1077;&#1088;&#1078;&#1072;&#1074;&#1085;&#1072; &#1072;&#1090;-&#1094;&#1110;&#1103;</div> </td> <td rowspan="2"> <div class="v">&#1050;&#1072;&#1085;&#1110;&#1082;&#1091;&#1083;&#1080;</div> </td> <td rowspan="2"> <div class="v">&#1059;&#1089;&#1100;&#1086;&#1075;&#1086;</div> </td> </tr> <tr> <?php for($k=1; $k<53; $k++) { ?> <td class="h" ><?php echo ("<div>$k</div>"); ?></td> <?php } ?> </tr> <tr> <?php for($k=0; $k<61; $k++) { ?> <td><?php echo ("<div>$k</div>"); ?></td> <?php } ?> </tr> </table> </page>