i am using playwright package of django for template, i want the same height of the tr should be applied for all the tr of table based on tallest tr. not expecting the tr should reposive its own content, all the tr should be same based on tallest tr
Html -
<tr>
<td>
<table class="line-item-table">
<thead>
<tr>
<th class="border-right border-bottom text-center sr-no">
Sr No.
</th>
<th
class="border-right border-bottom text-center des-of-goods"
>
Description of Goods
</th>
<th class="border-right border-bottom text-center qty">
Qty
</th>
<th class="border-right border-bottom text-center unit">
Unit
</th>
<th class="border-right border-bottom text-center rate">
Rate
</th>
<th class="border-right border-bottom text-center discount">
Disc. %
</th>
<th class="border-right border-bottom discount-amt">
Discount Amount
</th>
<th class="border-bottom text-center tax-amt">
Taxable Amount
</th>
</tr>
</thead>
<!-- <tbody>
{% for inv in invoiceData.dispatch_details %}
<tr>
<td class="border-right border-bottom sr-no">
<p class="font-lg">{{forloop.counter}}</p>
</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>{{inv.description|add_interval_in_string}}
</strong>
</p>
<div class="lower-content">
<div class="flex-space-between italic">
<p>HSN : {{inv.hsn_code}}</p>
<p>Width: -</p>
<p>Buyer Ref: {{inv.buyer_ref_no|add_interval_in_string}}</p>
</div>
<div class="flex-space-between italic">
<p>Order no: {{inv.order_number|add_interval_in_string}}</p>
<p>Challan/Packing no: {{inv.challan_slip_number|add_interval_in_string}}</p>
</div>
</div>
</td>
<td class="border-right border-bottom qty">
<p class="font-lg">{{inv.quantity}}</p>
</td>
<td class="border-right border-bottom unit">
<p class="font-lg">{{inv.unit_short_name}}</p>
</td>
<td class="border-right border-bottom rate">
<p class="font-lg">{{inv.rate_per_unit|add_interval_in_string:7}}</p>
</td>
<td class="border-right border-bottom discount">
<p class="font-lg">{{inv.discount_per}}</p>
</td>
<td class="border-right border-bottom discount-amt">
<p class="font-lg">{{inv.discount_amount}}</p>
</td>
<td class="border-bottom tax-amt">
<p class="font-lg">{{inv.amount}}</p>
</td>
</tr>
{% endfor %}
{% with total_qty_obj=invoiceData.dispatch_details|accumulate_unitwise_total %}
<tr>
<td class="border-right border-bottom"></td>
<td class="border-right border-bottom">
<p class="font-xxl"><strong>Total</strong></p>
</td>
{% for item in total_qty_obj.unit_wise_total %}
<td class="border-right border-bottom">
<p class="font-lg">{{ item.qty }}</p>
</td>
<td class="border-right border-bottom unit">
<p class="font-lg"><strong>{{ item.unit }}</strong></p>
</td>
{% endfor %}
<td class="border-right border-bottom"></td>
<td class="border-right border-bottom"></td>
<td class="border-right border-bottom">
<p class="font-lg"></p>
</td>
<td class="border-bottom">
<p class="font-lg"><strong>{{invoiceData.non_discounted_gross_amount}}</strong></p>
</td>
</tr>
{% endwith %}
</tbody> -->
<tbody>
<tr>
<td class="border-right border-bottom sr-no">1</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>TR45A/NS/5aSSHJLJ4- I : TR-45A : HEATSET : HEAT
SETTR-45A HEATSET bLUE
</strong>
</p>
<div class="flex-space-between">
<p>HSN : 6004100</p>
<p>Width: 60 ( inch )</p>
<p>Buyer Ref: VO240052</p>
</div>
<div class="flex-space-between">
<p>Order no: SRFSO2425- 00429</p>
<p>Challan/Packing no: SRFSD2425- 03410</p>
</div>
</td>
<td class="border-right border-bottom qty">21,232.00</td>
<td class="border-right border-bottom unit">Mtr.</td>
<td class="border-right border-bottom rate">9,610.80</td>
<td class="border-right border-bottom discount">100.00</td>
<td class="border-right border-bottom tax-amt">10,000.00</td>
<td class="border-bottom discount-amt">17,73,520.00</td>
</tr>
<tr>
<td class="border-right border-bottom sr-no">1</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>TR45A/NS/5aSSHJLJ4- I : TR-45A : HEATSET : HEAT
SETTR-45A HEATSET bLUE
DFSDFDSFSDGEFDSFADSAASDSADSADASDASDASDAASDASDASDASDSADSADSADSWEFFFASDASAFAFAFAFASFAFAFAAS</strong
>
</p>
<div class="flex-space-between">
<p>HSN : 6004100</p>
<p>Width: 60 ( inch )</p>
<p>Buyer Ref: VO240052</p>
</div>
<div class="flex-space-between">
<p>Order no: SRFSO2425- 00429</p>
<p>Challan/Packing no: SRFSD2425- 03410</p>
</div>
</td>
<td class="border-right border-bottom qty">21,232.00</td>
<td class="border-right border-bottom unit">Mtr.</td>
<td class="border-right border-bottom rate">9,610.80</td>
<td class="border-right border-bottom discount">100.00</td>
<td class="border-right border-bottom tax-amt">10,000.00</td>
<td class="border-bottom discount-amt">17,732.00</td>
</tr>
<tr>
<td class="border-right border-bottom sr-no">1</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>TR45A/NS/5aSSHJLJ4- I : TR-45A : HEATSET : HEAT
SETTR-45A HEATSET bLUE
</strong>
</p>
<div class="flex-space-between">
<p>HSN : 6004100</p>
<p>Width: 60 ( inch )</p>
<p>Buyer Ref: VO240052</p>
</div>
<div class="flex-space-between">
<p>Order no: SRFSO2425- 00429</p>
<p>Challan/Packing no: SRFSD2425- 03410</p>
</div>
</td>
<td class="border-right border-bottom qty">21,232.00</td>
<td class="border-right border-bottom unit">Mtr.</td>
<td class="border-right border-bottom rate">9,610.80</td>
<td class="border-right border-bottom discount">100.00</td>
<td class="border-right border-bottom tax-amt">10,000.00</td>
<td class="border-bottom discount-amt">17,73,520.00</td>
</tr>
<tr>
<td class="border-right border-bottom sr-no">1</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>TR45A/NS/5aSSHJLJ4- I : TR-45A : HEATSET : HEAT
SETTR-45A HEATSET bLUE
DFSDFDSFSDGEFDSFADSAASDSADSADASDASDASDAASDASDASDASDSADSADSADSWEFFFASDASAFAFAFAFASFAFAFAAS</strong
>
</p>
<div class="flex-space-between">
<p>HSN : 6004100</p>
<p>Width: 60 ( inch )</p>
<p>Buyer Ref: VO240052</p>
</div>
<div class="flex-space-between">
<p>Order no: SRFSO2425- 00429</p>
<p>Challan/Packing no: SRFSD2425- 03410</p>
</div>
</td>
<td class="border-right border-bottom qty">21,232.00</td>
<td class="border-right border-bottom unit">Mtr.</td>
<td class="border-right border-bottom rate">9,610.80</td>
<td class="border-right border-bottom discount">100.00</td>
<td class="border-right border-bottom tax-amt">10,000.00</td>
<td class="border-bottom discount-amt">17,732.00</td>
</tr>
<tr>
<td class="border-right border-bottom sr-no">1</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>TR45A/NS/5aSSHJLJ4- I : TR-45A : HEATSET : HEAT
SETTR-45A HEATSET bLUE
</strong>
</p>
<div class="flex-space-between">
<p>HSN : 6004100</p>
<p>Width: 60 ( inch )</p>
<p>Buyer Ref: VO240052</p>
</div>
<div class="flex-space-between">
<p>Order no: SRFSO2425- 00429</p>
<p>Challan/Packing no: SRFSD2425- 03410</p>
</div>
</td>
<td class="border-right border-bottom qty">21,232.00</td>
<td class="border-right border-bottom unit">Mtr.</td>
<td class="border-right border-bottom rate">9,610.80</td>
<td class="border-right border-bottom discount">100.00</td>
<td class="border-right border-bottom tax-amt">10,000.00</td>
<td class="border-bottom discount-amt">17,73,520.00</td>
</tr>
<tr>
<td class="border-right border-bottom sr-no">1</td>
<td
class="border-right border-bottom table-padding des-of-goods"
>
<p>
<strong
>TR45A/NS/5aSSHJLJ4- I : TR-45A : HEATSET : HEAT
SETTR-45A HEATSET bLUE
DFSDFDSFSDGEFDSFADSAASDSADSADASDASDASDAASDASDASDASDSADSADSADSWEFFFASDASAFAFAFAFASFAFAFAAS</strong
>
</p>
<div class="flex-space-between">
<p>HSN : 6004100</p>
<p>Width: 60 ( inch )</p>
<p>Buyer Ref: VO240052</p>
</div>
<div class="flex-space-between">
<p>Order no: SRFSO2425- 00429</p>
<p>Challan/Packing no: SRFSD2425- 03410</p>
</div>
</td>
<td class="border-right border-bottom qty">21,232.00</td>
<td class="border-right border-bottom unit">Mtr.</td>
<td class="border-right border-bottom rate">9,610.80</td>
<td class="border-right border-bottom discount">100.00</td>
<td class="border-right border-bottom tax-amt">10,000.00</td>
<td class="border-bottom discount-amt">17,732.00</td>
</tr>
</table>
</td>
</tr>
css-
table {
width: 100%;
border: 0;
border-collapse: collapse;
}
.line-item-table td {
/* flex: 1; */
font-size: 10px;
/* display: table-cell; */
vertical-align: top;
}
.line-item-table tr {
break-inside: avoid;
page-break-inside: avoid;
}
.line-item-table th {
word-break: break-word;
font-size: 12px;
vertical-align: middle;
}
.line-item-table tr td:not(.des-of-goods) {
vertical-align: middle;
text-align: center;
}
.line-item-table tr:last-child td {
word-break: break-word;
}
.line-item-table th {
word-break: break-word;
font-size: 12px;
vertical-align: middle;
}
.line-item-table tr td:not(.des-of-goods) {
vertical-align: middle;
}
.sr-no {
width: 3%;
text-align: center;
}
.des-of-goods {
width: 52.5%;
}
.qty {
width: 9.5%;
text-align: center;
}
.unit {
width: 5.5%;
text-align: center;
}
.rate {
width: 6.5%;
text-align: center;
}
.discount {
width: 5.4%;
text-align: center;
}
.tax-amt {
width: 9%;
text-align: center;
}
.discount-amt {
width: 8.6%;
text-align: center;
}
.des-of-goods .lower-content p {
font-size: 8px;
}
.font-head {
font-size: 12px;
}
i have tried this kind of css
.table-wrapper {
display: table;
width: 100%;
}
.table-wrapper table {
display: table;
border-collapse: separate;
border-spacing: 0;
width: 100%;
}
.table-wrapper tr {
display: table-row;
}
.table-wrapper td {
display: table-cell;
vertical-align: top;
}
but it’s not working….
not expecting the tr should reposive its own content, all the tr should be same based on tallest tr