I'm currently facing an issue with my HTML table.
The nested table on the right does not occupy the full height of the main table.
Even if the content in the description column is short, I want the column to resize accordingly. I have tried various adjustments to the height attribute without success.
I suspect that the fulfillmentLine class might be the root cause of this problem. Could someone kindly explain why this is happening?
My desired outcome looks like this:
https://i.sstatic.net/aPV3z.png
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table</title>
<style>
.innerTable {
padding: 0;
font-size: 20px;
}
.orderLine {
width: 130px;
padding: 3px;
border-left: 1px solid black;
border-bottom: 1px solid black;
}
.fulfillmentLine {
border-bottom: 1px solid black;
border-left: 1px solid black;
}
.fulfillmentLine td {
width: 50px;
height: 100px;
/* this */
border-right: 1px solid black;
}
.orderLineEnd {
border-left: 1px solid black;
}
.borderRight {
border-right: 1px solid black;
}
.orderLineHeader {
width: 130px;
padding: 3px;
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
.fulfillmentLineHeader {
width: 130px;
border-top: 1px solid black;
border-left: 1px solid black;
border-bottom: 1px solid black;
}
.fulfillmentLineHeader td {
border-top: 1px solid black;
border-right: 1px solid black;
text-align: center;
min-width: 45px;
}
.bottomBorder {
width: 100%;
height: 1px;
border-top: 1px solid black;
}
.itemName {
width: 300px;
}
</style>
</head>
<body>
<table class="bodySection o" cellpadding="0" cellspacing="0" border="0">
<tr class="orderHeaders">
<td class="orderLineHeader">Description</td>
<td class="fulfillmentLineHeader borderRight" align="center">
<table cellspacing="0" cellpadding="0" class="innerTable" border="0">
<td class="borderRightThick">ABC </td>
<td class="borderRightThick lightGreyRow">ABC</td>
<td class="borderRightThick">ABC</td>
</table>
</td>
</tr>
<tr style="page-break-inside : avoid">
<td class="orderLine itemName">Lorem ipsum loremLorem ipsum loremLorem ipsum Lorem ipsum loremLorem ipsum
loremLorem ipsum loremLorem ipsum loremLorem ipsum loremLorem ipsum loremLorem ipsum loremloremLorem
ipsum loremLorem ipsum lorem</b></td>
<td class="fulfillmentLine borderRight">
<table cellspacing="0" class="innerTable ">
<td></td>
<td></td>
<td></td>
</table>
</td>
</tr>
</table>
</div>
</table>
<br />
</body>
</html>