Reputation: 2226
I am using a reporting tool, which allows slight customising through HTML.
Constrains:
This tool will print multiple rows per each student, depending on subject matters, learning objects, etc. In a word, number of rows in the table can vary.
The issue is, if the 2nd column in the table is higher than the first one, the rows in the first column will not fill height, thus leaving blank space after the last row:
What I would like to achieve, is to adjust row heights in 1st column to fill column height proportionally so that there's no extra gap after the last row, in case the 2nd column is higher than the first one (see JSFiddle below)
Report code templates, which could be adjusted somehow:
Main loop template
<table class="no-loop-table" style="width: 100%;" border="1">
<thead>
<tr style="background-color: #ecf1de;">
<th style="padding: 5px; background-color: #ecf1de; text-align: left; width: 70%;" colspan="2"><span style="font-family: 'trebuchet ms', geneva; font-size: small;"> «·materia·» «·materia - breve specifica·» «·materia - asterischi·» </span></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left; font-size: 12pt; width: 30%;" valign="top"><code class="docband">LOOP("band-22","/studenti/materie/nuove competenze"):: <span>«·valore lettere·» != ''</span></code></td>
<td style="text-align: justify; padding: 5px;" valign="top"><span style="font-size: medium; font-family: 'trebuchet ms', geneva;">«·nota o giudizio·» </span></td>
</tr>
</tbody>
</table>
Row template
<table class="bottom-line" style="width: 100%;" border="1">
<tbody>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">«·descrizione con a capo·»</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>«·valore sigla·»</strong></span></td>
</tr>
</tbody>
</table>
<p> </p>
Generated output by reporting tool:
<table class="no-loop-table" style="width: 100%;" border="1">
<thead>
<tr style="background-color: #ecf1de;">
<th style="padding: 5px; background-color: #ecf1de; text-align: left; width: 70%;" colspan="2"><span style="font-family: 'trebuchet ms', geneva; font-size: small;"> INGLESE </span></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left; font-size: 12pt; width: 30%;" valign="top">
<table class="bottom-line" style="width: 100%;" border="1">
<tbody>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">Ascolto (comprensione orale)</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>C</strong></span></td>
</tr>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">Parlato (produzione e interazione orale)</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>A</strong></span></td>
</tr>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">Lettura (comprensione scritta)</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>C</strong></span></td>
</tr>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">Ascolto (comprensione orale)</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>C</strong></span></td>
</tr>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">Parlato (produzione e interazione orale)</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>A</strong></span></td>
</tr>
<tr>
<td style="padding-top: 5px; padding-bottom: 5px; width: 80%; border-right: 1px solid black; text-align: left;"><span style="font-size: small;">Lettura (comprensione scritta)</span></td>
<td style="padding-left: 8%; padding-top: 5px; padding-bottom: 5px; width: 20%;"><span style="font-family: 'trebuchet ms', geneva; font-size: medium;"><strong>C</strong></span></td>
</tr>
</tbody>
</table>
<p> </p>
</td>
<td style="text-align: justify; padding: 5px;" valign="top"><span style="font-size: medium; font-family: 'trebuchet ms', geneva;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam mollis a sapien sit amet hendrerit. Nam cursus erat at magna mattis consequat. Vestibulum sed quam non massa tristique fringilla. Morbi sagittis tincidunt nibh sit amet sodales. Donec vitae ligula felis. Mauris eu tincidunt leo. Pellentesque placerat nisl in nibh elementum, egestas tincidunt eros consequat. Quisque faucibus iaculis eros, nec hendrerit odio tempus sollicitudin. Proin in porta metus. Integer imperdiet mattis leo et consectetur. Duis lacinia scelerisque laoreet. Cras molestie tellus vel libero porta ornare. Integer tincidunt viverra suscipit. Mauris non pellentesque nisi. Nullam commodo, mi in vestibulum tincidunt, diam odio congue metus, quis lacinia enim est ac lacus. Donec ipsum nibh, vehicula sed metus sit amet, fringilla bibendum odio. Suspendisse vel ultrices eros. Duis vel tortor rutrum, pharetra nulla at, molestie ex. Proin tincidunt lectus sit amet metus feugiat iaculis. In hac habitasse platea dictumst. Fusce mollis tristique ligula suscipit luctus. Sed sed nibh vitae diam mollis pretium nec in nisi. Aenean auctor interdum efficitur. Donec id aliquam nunc.
</span>
</td>
</tr>
</tbody>
</table>
https://jsfiddle.net/kf0u458c/
Upvotes: 1
Views: 38
Reputation: 1289
If the html was generated, as you said, by an external element and not by you, and if there are no options to act on provided by the external element, my idea is to act on the element by intercepting it on a stylesheet, although as you wrote this is not the way you want to go.
For example
table {
table-layout: fixed;
height: 100%;
}
To be more specific, I would add an id to the table with a bottom-line class, so that the change is unique.
For example
#table1 {
table-layout: fixed;
height: 100%;
}
Upvotes: 1